From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Parker Subject: Re: org-babel and gnuplot Date: Tue, 7 Sep 2010 22:12:11 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1317916683==" Return-path: Received: from [140.186.70.92] (port=41181 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtB5P-00055I-7D for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 23:12:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtB5N-0000u8-BE for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 23:12:35 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:61247) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtB5N-0000ty-1O for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 23:12:33 -0400 Received: by bwz6 with SMTP id 6so5960295bwz.0 for ; Tue, 07 Sep 2010 20:12:31 -0700 (PDT) In-Reply-To: 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: John Hendy Cc: emacs-orgmode@gnu.org --===============1317916683== Content-Type: multipart/alternative; boundary=0015175cadb65e0763048fb6e235 --0015175cadb65e0763048fb6e235 Content-Type: text/plain; charset=ISO-8859-1 Hi John, I would actually like to plot different lines per distance, each that correlate to a date and elapsed-time (x and y axis respectively). I get an error with the :file notation, though I read that in a sample babel gnuplot example for generating graphs of commit history on the org-mode git repository. I tried to reference the variable data without the quotes and $ sign without any success. I will continue to fiddle with it, I am new to gnuplot. Nick Parker www.developernotes.com On Tue, Sep 7, 2010 at 8:54 PM, John Hendy wrote: > Hi Nick, > > Maybe two things off hand (booted into OS X right now where I can't try > your code..) > > 1) try using straight gnuplot without going through org to verify your > commands. This helps make sure that the syntax isn't producing errors. > Another way to check this out sometimes is to C-c C-c on the code block, run > the code, and then C-x b to the *gnuplot buffer to view any error messages. > Those might prove helpful. > > 2) try changing your plot line to: plot data using 1:2:3 notitle > > I think I ran into an issue using "$data" even though it's the gnuplot > syntax. I found org examples on the mailing list where just "data" was used > instead (no quotes) and that worked. > > > John > > P.S. Are you trying to make a 3D graph? plot using 1:2:3 will yield a 3D > graph and you didn't mention a z-axis label so I'm wondering if that's > really what you want? You may want to split this into two graphs to have > date vs. time and date vs. distance? Or date vs. distance/time (speed)? > > P.P.S Or perhaps judging by the boxwidth option you want the width of the > bars in the graph to represent the miles run? In that case you want 'plot > data using 1:2:3 with boxes notitle' I think. > > > > On Tue, Sep 7, 2010 at 8:29 PM, Nick Parker wrote: > >> Hello, >> >> I am attempting to generate a simple chart from gnuplot using the source >> of an org-table. When I execute the gnuplot src block I get the message >> "Source block produced no output". Does anyone have any suggestions as to >> what might be the cause? I have included a sample of what I am trying to >> run: >> >> #+tblname: sessions >> | Date | Time | Distance | >> |------------+-------+----------| >> | 09/02/2010 | 15:13 | 2.5 | >> | 09/01/2010 | 14:00 | 2.4 | >> >> #+begin_src gnuplot :var data=sessions >> :file org-running.png :exports both >> set title "Running Stats" >> set auto x >> set style data histogram >> set style fill solid border -1 >> set boxwidth .9 >> set xlabel "Date" >> set ylabel "Time" >> plot "$data" using 1:2:3 notitle >> #+end_src >> >> Nick Parker >> www.developernotes.com >> >> _______________________________________________ >> 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 >> >> > --0015175cadb65e0763048fb6e235 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi John,

I would actually like to plot different lines p= er distance, each that=A0correlate=A0to a date and elapsed-time (x and y ax= is respectively). =A0I get an error with the :file notation, though I read = that in a sample babel gnuplot example for generating graphs of commit hist= ory on the org-mode git repository. =A0I tried to reference the variable da= ta without the quotes and $ sign without any success. =A0I will continue to= fiddle with it, I am new to gnuplot.

Nick Parker
www.developern= otes.com


On Tue, Sep 7, 2010 at 8:54 PM, John Hen= dy <jw.hendy@gma= il.com> wrote:
Hi Nick,

Maybe two things off hand (booted into OS X rig= ht now where I can't try your code..)

1) try u= sing straight gnuplot without going through org to verify your commands. Th= is helps make sure that the syntax isn't producing errors. Another way = to check this out sometimes is to C-c C-c on the code block, run the code, = and then C-x b to the *gnuplot buffer to view any error messages. Those mig= ht prove helpful.

2) try changing your plot line to:=A0plot data using 1:= 2:3 notitle

I think I ran into an issue using &quo= t;$data" even though it's the gnuplot syntax. I found org examples= on the mailing list where just "data" was used instead (no quote= s) and that worked.


John

P.S. Are y= ou trying to make a 3D graph? plot using 1:2:3 will yield a 3D graph and yo= u didn't mention a z-axis label so I'm wondering if that's real= ly what you want? You may want to split this into two graphs to have date v= s. time and date vs. distance? Or date vs. distance/time (speed)?

P.P.S Or perhaps judging by the boxwidth option you wan= t the width of the bars in the graph to represent the miles run? In that ca= se you want 'plot data using 1:2:3 with boxes notitle' I think.



On Tue, Sep 7, 2010 at 8:29 PM, Nick Parker <nickp@de= velopernotes.com> wrote:
Hello,

I am attempting to generate a simple chart from g= nuplot using the source of an org-table. =A0When I execute the gnuplot src = block I get the message "Source block produced no output". =A0Doe= s anyone have any suggestions as to what might be the cause? =A0I have incl= uded a sample of what I am trying to run:

#+tblname: sessions
| Date =A0 =A0 =A0 |= =A0Time | Distance |
|------------+-------+----------|
| 09/02/2010 | 15:13 | =A0 =A0 =A02.5 |
| 09/01/2010 | 14:00 | = =A0 =A0 =A02.4 |

#+begin_src gnuplot :var data=3Dsessions
=A0= =A0:file org-running.png :exports both
=A0=A0set title "Runn= ing Stats"
=A0=A0set auto x
=A0=A0set style data h= istogram
=A0=A0set style fill solid border -1
=A0=A0set boxwidth .9
<= div>=A0=A0set xlabel "Date"
=A0=A0set ylabel "Time= "
=A0=A0plot "$data" using 1:2:3 notitle
#+end_src


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gn= u.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



--0015175cadb65e0763048fb6e235-- --===============1317916683== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1317916683==--