emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-babel-gnuplot broken today?
@ 2010-10-26 20:10 Nigel Beck
  2010-10-26 21:06 ` John Hendy
  0 siblings, 1 reply; 11+ messages in thread
From: Nigel Beck @ 2010-10-26 20:10 UTC (permalink / raw)
  To: emacs-orgmode

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.

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

Plotting data points from a table could look like this:
#+tblname: basic-plot
|   x |         y1 |         y2 |
|-----+------------+------------|
| 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 | 0.23333323 |  0.2333332 |
|   1 |     0.2225 |       0.22 |

#+begin_src gnuplot :var data=basic-plot :exports code :file basic-plot.png
set title "Putting it All Together"

set xlabel "X"
set xrange [0:1]
set xtics 0,0.1,1


set ylabel "Y"
set yrange [0.2:0.5]
set ytics 0.2,0.05,0.5


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'
#+end_src

#+results:
[[file:basic-plot.png]]



Exporting or executing the gnuplot piece, Gnuplot (Gnuplot 4.4 patch
 level 1) complains:

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 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 0.23333323 0.2333332) (1 0.2225 0.22))"
         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 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 0.23333323 
0.2333332) (1 0.2225 0.22))"
         No data in plot


So of course no basic-plot.png is created....

As far as I know, my gnuplots were happy sometime within the past week
refreshing org-mode from git basically daily...

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: org-babel-gnuplot broken today?
  2010-10-26 20:10 org-babel-gnuplot broken today? Nigel Beck
@ 2010-10-26 21:06 ` John Hendy
  2010-10-26 22:22   ` Nigel Beck
  0 siblings, 1 reply; 11+ messages in thread
From: John Hendy @ 2010-10-26 21:06 UTC (permalink / raw)
  To: Nigel Beck; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1836 bytes --]

On Tue, Oct 26, 2010 at 3:10 PM, Nigel Beck <me@nigelbeck.com> 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!


> 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
>
> Plotting data points from a table could look like this:
> #+tblname: basic-plot
>

---- 8< ----


> Exporting or executing the gnuplot piece, Gnuplot (Gnuplot 4.4 patch
>  level 1) complains:
>
> gnuplot> plot data u 1:2 w p lw 2 title 'x vs. y1', \
>

---- 8< ----


>         No data in plot
>
>
> So of course no basic-plot.png is created....
>
> As far as I know, my gnuplots were happy sometime within the past week
> refreshing org-mode from git basically daily...
>
>
That's odd indeed. I copied and pasted your exact table and code from the
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, per 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 file
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


>
> _______________________________________________
> 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
>

[-- Attachment #1.2: Type: text/html, Size: 3234 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: org-babel-gnuplot broken today?
  2010-10-26 21:06 ` John Hendy
@ 2010-10-26 22:22   ` Nigel Beck
  2010-10-26 22:43     ` Eric Schulte
  0 siblings, 1 reply; 11+ messages in thread
From: Nigel Beck @ 2010-10-26 22:22 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

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 <jw.hendy@gmail.com> writes:

> On Tue, Oct 26, 2010 at 3:10 PM, Nigel Beck <me@nigelbeck.com> 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!
>  
>
>     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
>    
>     Plotting data points from a table could look like this:
>     #+tblname: basic-plot
>
> ---- 8< ----
>  
>
>     Exporting or executing the gnuplot piece, Gnuplot (Gnuplot 4.4 patch
>      level 1) complains:
>    
>     gnuplot> plot data u 1:2 w p lw 2 title 'x vs. y1', \
>
> ---- 8< ----
>  
>
>             No data in plot
>
>     So of course no basic-plot.png is created....
>    
>     As far as I know, my gnuplots were happy sometime within the past week
>     refreshing org-mode from git basically daily...
>
> That's odd indeed. I copied and pasted your exact table and code from the 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, per 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 file 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
>  
>
>     _______________________________________________
>     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

-- 
Nigel Beck
http://www.nigelbeck.com
+1-323-NDUGU-ME (323-638-4863)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: org-babel-gnuplot broken today?
  2010-10-26 22:22   ` Nigel Beck
@ 2010-10-26 22:43     ` Eric Schulte
  2010-10-26 23:12       ` Nigel Beck
  2010-10-26 23:21       ` Nick Dokos
  0 siblings, 2 replies; 11+ messages in thread
From: Eric Schulte @ 2010-10-26 22:43 UTC (permalink / raw)
  To: Nigel Beck; +Cc: emacs-orgmode

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=10
#+begin_src gnuplot
  a=10
  plot a
#+end_src

Best -- Eric

Nigel Beck <me@nigelbeck.com> 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 <jw.hendy@gmail.com> writes:
>
>> On Tue, Oct 26, 2010 at 3:10 PM, Nigel Beck <me@nigelbeck.com> 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!
>>  
>>
>>     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
>>    
>>     Plotting data points from a table could look like this:
>>     #+tblname: basic-plot
>>
>> ---- 8< ----
>>  
>>
>>     Exporting or executing the gnuplot piece, Gnuplot (Gnuplot 4.4 patch
>>      level 1) complains:
>>    
>>     gnuplot> plot data u 1:2 w p lw 2 title 'x vs. y1', \
>>
>> ---- 8< ----
>>  
>>
>>             No data in plot
>>
>>     So of course no basic-plot.png is created....
>>    
>>     As far as I know, my gnuplots were happy sometime within the past week
>>     refreshing org-mode from git basically daily...
>>
>> That's odd indeed. I copied and pasted your exact table and code from the 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, per 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 file 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
>>  
>>
>>     _______________________________________________
>>     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: 
[1]  http://www.gnuplot.info/docs/gnuplot.html#x1-3100013.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: org-babel-gnuplot broken today?
  2010-10-26 22:43     ` Eric Schulte
@ 2010-10-26 23:12       ` Nigel Beck
  2010-10-26 23:21       ` Nick Dokos
  1 sibling, 0 replies; 11+ messages in thread
From: Nigel Beck @ 2010-10-26 23:12 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode

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 = "((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 
 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> 
gnuplot> set xlabel "X"
gnuplot> set xrange [0:1]
gnuplot> set xtics 0,0.1,1
gnuplot> 
gnuplot> 
gnuplot> set ylabel "Y"
gnuplot> set yrange [0.2:0.5]
gnuplot> set ytics 0.2,0.05,0.5
gnuplot> 
gnuplot> 
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 
         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 0.23333323 
         0.2333332) (1 0.2225 0.22))"
         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 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 0.23333323 0.2333332) 
         (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" <schulte.eric@gmail.com> 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=10
> #+begin_src gnuplot
>   a=10
>   plot a
> #+end_src
>
> Best -- Eric
>
> Nigel Beck <me@nigelbeck.com> 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 <jw.hendy@gmail.com> writes:
>>
>>> On Tue, Oct 26, 2010 at 3:10 PM, Nigel Beck <me@nigelbeck.com> 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!
>>>  
>>>
>>>     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
>>>    
>>>     Plotting data points from a table could look like this:
>>>     #+tblname: basic-plot
>>>
>>> ---- 8< ----
>>>  
>>>
>>>     Exporting or executing the gnuplot piece, Gnuplot (Gnuplot 4.4 patch
>>>      level 1) complains:
>>>    
>>>     gnuplot> plot data u 1:2 w p lw 2 title 'x vs. y1', \
>>>
>>> ---- 8< ----
>>>  
>>>
>>>             No data in plot
>>>
>>>     So of course no basic-plot.png is created....
>>>    
>>>     As far as I know, my gnuplots were happy sometime within the past week
>>>     refreshing org-mode from git basically daily...
>>>
>>> That's odd indeed. I copied and pasted your exact table and code from the 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, per 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 file 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
>>>  
>>>
>>>     _______________________________________________
>>>     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: 
> [1]  http://www.gnuplot.info/docs/gnuplot.html#x1-3100013.4
>

-- 
Nigel Beck
http://www.nigelbeck.com
+1-323-NDUGU-ME (323-638-4863)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: org-babel-gnuplot broken today?
  2010-10-26 22:43     ` Eric Schulte
  2010-10-26 23:12       ` Nigel Beck
@ 2010-10-26 23:21       ` Nick Dokos
  2010-10-27  4:31         ` Nick Dokos
  2010-10-27  4:53         ` Eric Schulte
  1 sibling, 2 replies; 11+ messages in thread
From: Nick Dokos @ 2010-10-26 23:21 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Nigel Beck, emacs-orgmode, nicholas.dokos

Eric Schulte <schulte.eric@gmail.com> 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 <me@nigelbeck.com> 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 <jw.hendy@gmail.com> writes:
> >
> >> On Tue, Oct 26, 2010 at 3:10 PM, Nigel Beck <me@nigelbeck.com> 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
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: org-babel-gnuplot broken today?
  2010-10-26 23:21       ` Nick Dokos
@ 2010-10-27  4:31         ` Nick Dokos
  2010-10-27  4:53         ` Eric Schulte
  1 sibling, 0 replies; 11+ messages in thread
From: Nick Dokos @ 2010-10-27  4:31 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Nigel Beck, emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> wrote:

> Eric Schulte <schulte.eric@gmail.com> 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.
> 

One more data point: the result-type problem was resolved in the following

commit cea9fd742129f74b9ea38d7d9d74ca751271fce2 (release_7.01h-786-gcea9fd7)

and that one still shows the gnuplot problem. So it's down to 36 commits.

HTH,
Nick

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: org-babel-gnuplot broken today?
  2010-10-26 23:21       ` Nick Dokos
  2010-10-27  4:31         ` Nick Dokos
@ 2010-10-27  4:53         ` Eric Schulte
  2010-10-27  5:08           ` Nick Dokos
  1 sibling, 1 reply; 11+ messages in thread
From: Eric Schulte @ 2010-10-27  4:53 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Nigel Beck, emacs-orgmode

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 <nicholas.dokos@hp.com> writes:

> Eric Schulte <schulte.eric@gmail.com> 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 <me@nigelbeck.com> 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 <jw.hendy@gmail.com> writes:
>> >
>> >> On Tue, Oct 26, 2010 at 3:10 PM, Nigel Beck <me@nigelbeck.com> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: org-babel-gnuplot broken today?
  2010-10-27  4:53         ` Eric Schulte
@ 2010-10-27  5:08           ` Nick Dokos
  2010-10-27 14:20             ` Nigel Beck
  0 siblings, 1 reply; 11+ messages in thread
From: Nick Dokos @ 2010-10-27  5:08 UTC (permalink / raw)
  To: Eric Schulte; +Cc: nicholas.dokos, emacs-orgmode, Nigel Beck

Eric Schulte <schulte.eric@gmail.com> wrote:

> 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.
> 

Problem gone with Nigel's (actually John's, iiuc) original example. I didn't
try your examples, but somehow I'm pretty sure that those will work
too!

Thanks,
Nick

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: org-babel-gnuplot broken today?
  2010-10-27  5:08           ` Nick Dokos
@ 2010-10-27 14:20             ` Nigel Beck
  2010-10-27 14:51               ` Noorul Islam
  0 siblings, 1 reply; 11+ messages in thread
From: Nigel Beck @ 2010-10-27 14:20 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

Thanks all - problem gone over here too! (Tested in a few other
permutations on the original convoluted doc that I hit the error in). 

Btw on the latest pull I get an error on the "make doc" part

(cd doc; makeinfo --html --number-sections --no-split -o org.html org.texi)
org.texi:1330: Unknown command `Vindex'.
makeinfo: Removing output file `org.html' due to errors; use --force to preserve.
*** Error code 1

Stop in /home/nigel/Installation/org-mode (line 245 of Makefile).


I'll move to another post if its unrelated to this commit; just thought
that if it was introduced somehow in this fix, perhaps its easiest to
address here.

Thanks again!

Nick Dokos <nicholas.dokos@hp.com> writes:

> Eric Schulte <schulte.eric@gmail.com> wrote:
>
>> 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.
>> 
>
> Problem gone with Nigel's (actually John's, iiuc) original example. I didn't
> try your examples, but somehow I'm pretty sure that those will work
> too!
>
> Thanks,
> Nick
>
> _______________________________________________
> 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
>

-- 
Nigel Beck
http://www.nigelbeck.com
+1-323-NDUGU-ME (323-638-4863)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: org-babel-gnuplot broken today?
  2010-10-27 14:20             ` Nigel Beck
@ 2010-10-27 14:51               ` Noorul Islam
  0 siblings, 0 replies; 11+ messages in thread
From: Noorul Islam @ 2010-10-27 14:51 UTC (permalink / raw)
  To: Nigel Beck; +Cc: nicholas.dokos, emacs-orgmode

On Wed, Oct 27, 2010 at 7:50 PM, Nigel Beck <me@nigelbeck.com> wrote:
> Thanks all - problem gone over here too! (Tested in a few other
> permutations on the original convoluted doc that I hit the error in).
>
> Btw on the latest pull I get an error on the "make doc" part
>
> (cd doc; makeinfo --html --number-sections --no-split -o org.html org.texi)
> org.texi:1330: Unknown command `Vindex'.
> makeinfo: Removing output file `org.html' due to errors; use --force to preserve.
> *** Error code 1
>

Already posted a patch for this.

Thanks and Regards
Noorul

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-10-27 14:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-26 20:10 org-babel-gnuplot broken today? Nigel Beck
2010-10-26 21:06 ` John Hendy
2010-10-26 22:22   ` Nigel Beck
2010-10-26 22:43     ` Eric Schulte
2010-10-26 23:12       ` Nigel Beck
2010-10-26 23:21       ` Nick Dokos
2010-10-27  4:31         ` Nick Dokos
2010-10-27  4:53         ` Eric Schulte
2010-10-27  5:08           ` Nick Dokos
2010-10-27 14:20             ` Nigel Beck
2010-10-27 14:51               ` Noorul Islam

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).