From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nigel Beck Subject: Re: Re: org-babel-gnuplot broken today? Date: Tue, 26 Oct 2010 19:12:17 -0400 Message-ID: <87ocagmtv2.fsf@asusbsd.danakil.selfip.com> References: <87zku0af67.fsf@asusbsd.danakil.selfip.com> <87sjzsmw69.fsf@asusbsd.danakil.selfip.com> <87ocag8thv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=52438 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAsgr-0002ng-DA for emacs-orgmode@gnu.org; Tue, 26 Oct 2010 19:12:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAsgp-0005xZ-H6 for emacs-orgmode@gnu.org; Tue, 26 Oct 2010 19:12:25 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:56706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PAsgp-0005xS-CQ for emacs-orgmode@gnu.org; Tue, 26 Oct 2010 19:12:23 -0400 In-Reply-To: <87ocag8thv.fsf@gmail.com> (Eric Schulte's message of "Tue, 26 Oct 2010 16:43:56 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org Eric - thanks. I'm using 4.4 as well. Up until today, the gnuplot code blocks using data from org-mode tables worked fine. As of today, the data from the org-mode tables appears to come through to gnuplot in a format that gnuplot cannot understand. I guessing thats why gnuplot is complaining that "data", the variable containing the data from the org-mode table, is a "bad file". Running the aforementioned example from the worg, the *gnuplot* output is gnuplot> data =3D "((0.1 0.425 0.375) (0.2 0.3125 0.3375) (0.3 0.24999993 0.28333338) (0.4 0.275 0.28125) (0.5 0.26 0.27) (0.6 0.25833338 0.24999993) (0.7 0.24642845 0.23928553) (0.8 0.23125 0.2375) (0.9=20 0.23333323 0.2333332) (1 0.2225 0.22))" gnuplot> set term png Terminal type set to 'pngcairo' Options are ' size 640, 480 ' gnuplot> set output "basic-plot.png" gnuplot> set title "Putting it All Together" gnuplot>=20 gnuplot> set xlabel "X" gnuplot> set xrange [0:1] gnuplot> set xtics 0,0.1,1 gnuplot>=20 gnuplot>=20 gnuplot> set ylabel "Y" gnuplot> set yrange [0.2:0.5] gnuplot> set ytics 0.2,0.05,0.5 gnuplot>=20 gnuplot>=20 gnuplot> plot data u 1:2 w p lw 2 title 'x vs. y1', \ > data u 1:3 w lp lw 1 title 'x vx. y2' warning: Skipping unreadable file "((0.1 0.425 0.375) (0.2 0.3125 0.3375) (0.3 0.24999993 0.28333338) (0.4 0.275=20 0.28125) (0.5 0.26 0.27) (0.6 0.25833338 0.24999993) (0.7=20 0.24642845 0.23928553) (0.8 0.23125 0.2375) (0.9 0.23333323=20 0.2333332) (1 0.2225 0.22))" warning: Skipping unreadable file "((0.1 0.425 0.375) (0.2=20 0.3125 0.3375) (0.3 0.24999993 0.28333338) (0.4 0.275 0.28125)=20 (0.5 0.26 0.27) (0.6 0.25833338 0.24999993) (0.7 0.24642845=20 0.23928553) (0.8 0.23125 0.2375) (0.9 0.23333323 0.2333332)=20 (1 0.2225 0.22))" No data in plot I've not regenerated the plots for a few days - maybe a week - so I cannot be confident that only something today broke this. I'm fairly confident that only org-mode (and as aforementioned emacs-w3m) have changed in my emacs setup. "Eric Schulte" writes: > Hi Nigel, > > Org-mode gnuplot code blocks do make use of user variables [1] for > passing arguments into gnuplot. I believe that this feature may only be > available in later versions of gnuplot. I'm using gnuplot 4.4 locally > and I've had no problems using gnuplot from Org-mode code blocks which I > do most every day. > > the syntax for defining variables is fairly simple, try the following > directly in the gnuplot terminal, if your gnuplot does have variable > support it should graph a straight line of y=3D10 > #+begin_src gnuplot > a=3D10 > plot a > #+end_src > > Best -- Eric > > Nigel Beck writes: > >> John - thanks for the quick reply (and, btw, the very useful tutorial). >> >> I ought to have noted that the example works fine when invoked directly >> from the command line, with the only change being that I move the data >> into a file (mainly because I don't know the correct gnuplot syntax for >> putting table data into a variable!). >> >> I haven't updated gnuplot since installing it, so I believe the org-mode >> <-> gnuplot unfriendliness lies in some effect that a recent pull of >> 7.01trans has had. (I did updated emacs-w3m from cvs the other day, so I >> suppose thats another possible source of error, but it seems unlikely). >> >> I agree that it appears that the table data being handed to gnuplot >> from org-mode is somehow being formatted in a way that gnuplot does not = understand. >> >> John Hendy writes: >> >>> On Tue, Oct 26, 2010 at 3:10 PM, Nigel Beck wrote: >>> >>> I refreshed today 7.01trans and noticed I couldn't get my gnuplots = to >>> plot anymore: data from a table within the org file is no longer >>> digested nicely by gnuplot. >>> >>> That's odd. I wrote the tutorial and thus my heart skipped a beat for a= moment! >>> =C2=A0 >>> >>> To test, I used the snippet below from the worg >>> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.= php: >>> >>> ** Data Table Plot >>>=20=20=20=20 >>> Plotting data points from a table could look like this: >>> #+tblname: basic-plot >>> >>> ---- 8< ---- >>> =C2=A0 >>> >>> Exporting or executing the gnuplot piece, Gnuplot (Gnuplot 4.4 patch >>> =C2=A0level 1) complains: >>>=20=20=20=20 >>> gnuplot> plot data u 1:2 w p lw 2 title 'x vs. y1', \ >>> >>> ---- 8< ---- >>> =C2=A0 >>> >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 No data in plot >>> >>> So of course no basic-plot.png is created.... >>>=20=20=20=20 >>> As far as I know, my gnuplots were happy sometime within the past w= eek >>> refreshing org-mode from git basically daily... >>> >>> That's odd indeed. I copied and pasted your exact table and code from t= he email and was able to generate the plot. The error is >>> quite odd. It almost makes me wonder if something is different about ho= w gnuplot is receiving the data. Like a syntax error or >>> something. I would say that at this point it's not the table or code, p= er se, since I can generate the plot. Hopefully someone will >>> chime in with more experience who may have seen this error? >>> >>> One thing to try in the meantime... Gather up some gnuplot test data fi= le and try to run it from the command line perhaps? It would >>> at least be one way to see if it's working outside of org-mode? >>> >>> Best regards, >>> John >>> =C2=A0 >>> >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Please use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >>> >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Please use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > Footnotes:=20 > [1] http://www.gnuplot.info/docs/gnuplot.html#x1-3100013.4 > --=20 Nigel Beck http://www.nigelbeck.com +1-323-NDUGU-ME (323-638-4863)