From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: org-babel-gnuplot broken today? Date: Tue, 26 Oct 2010 22:53:21 -0600 Message-ID: <87iq0ob5j2.fsf@gmail.com> References: <87zku0af67.fsf@asusbsd.danakil.selfip.com> <87sjzsmw69.fsf@asusbsd.danakil.selfip.com> <87ocag8thv.fsf@gmail.com> <11040.1288135281@alphaville.usa.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=51415 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAy0v-0003TK-Mt for emacs-orgmode@gnu.org; Wed, 27 Oct 2010 00:53:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAy0u-0005Or-5i for emacs-orgmode@gnu.org; Wed, 27 Oct 2010 00:53:29 -0400 Received: from mail-gx0-f169.google.com ([209.85.161.169]:42090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PAy0u-0005Ol-1R for emacs-orgmode@gnu.org; Wed, 27 Oct 2010 00:53:28 -0400 Received: by gxk2 with SMTP id 2so147828gxk.0 for ; Tue, 26 Oct 2010 21:53:27 -0700 (PDT) In-Reply-To: <11040.1288135281@alphaville.usa.hp.com> (Nick Dokos's message of "Tue, 26 Oct 2010 19:21:21 -0400") 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: nicholas.dokos@hp.com Cc: Nigel Beck , emacs-orgmode@gnu.org Ah, My apologies, thank you both for persisting in raising this issue. It seems there are *two* ways to pass variables into gnuplot. One uses user variables [1], and the other directly replaces variables in the code block [2]. You've been using the former, and I've been using the latter. The bug only existed in the former, but I believe I've now fixed that issue, and in fact I think I'll start using user variables as in your example below. Please let me know if the problem persists after a fresh pull of the repository. Best -- Eric Nick Dokos writes: > Eric Schulte wrote: > >> 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. >> > > Did you try the example that Nigel posted? I think babel *is* broken. > I tried a bisect and can verify that > > commit f16c46c856afbd41b115a6a50306c0c002cdb333 is good (release_7.01h-750-gf16c46c) > commit b664510ec4811491e4611791c24591153abdf5f3 is bad (release_7.01h-800-gb664510) > > but the sequence is not bisectable: when it tries the middle commit > 2699f4e9bc7695432cf6aaf1dd48e182b10c2847 (release_7.01h-775-g2699f4e) > it gets "Symbol's value as variable is void: result-type" and it's > not clear to me how to proceed with the bisection at that point. I tried > skipping a bit, but the results were mixed at best. > > So it looks to me as if something in those 50 commits broke it. > > HTH, > Nick > > >> 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 u= >> nderstand. >> > >> > 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.p= >> hp: >> >> >> >> ** 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 we= >> ek >> >> refreshing org-mode from git basically daily... >> >> >> >> That's odd indeed. I copied and pasted your exact table and code from th= >> e email and was able to generate the plot. The error is >> >> quite odd. It almost makes me wonder if something is different about how= >> 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, pe= >> r 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 fil= >> e 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 >> >> >> _______________________________________________ >> 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: [1] using user variables #+results: some-more-gnuplot | 1 | 1 | | 2 | 4 | | 3 | 9 | | 4 | 16 | | 5 | 25 | | 6 | 36 | | 7 | 49 | | 8 | 64 | #+TBLFM: $2=$1*$1 #+begin_src gnuplot :var data=some-more-gnuplot plot data #+end_src [2] direct replacement #+results: some-more-gnuplot | 1 | 1 | | 2 | 4 | | 3 | 9 | | 4 | 16 | | 5 | 25 | | 6 | 36 | | 7 | 49 | | 8 | 64 | #+TBLFM: $2=$1*$1 #+begin_src gnuplot :var data=some-more-gnuplot plot "$data" #+end_src