emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: org-babel-gnuplot broken today?


From: Eric Schulte
Subject: Re: [Orgmode] Re: org-babel-gnuplot broken today?
Date: Tue, 26 Oct 2010 16:43:56 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

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 <address@hidden> 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 <address@hidden> writes:
>
>> On Tue, Oct 26, 2010 at 3:10 PM, Nigel Beck <address@hidden> 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.
>>     address@hidden
>>     http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Footnotes: 
[1]  http://www.gnuplot.info/docs/gnuplot.html#x1-3100013.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]