From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: org-babel and gnuplot Date: Tue, 7 Sep 2010 20:54:20 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0682005450==" Return-path: Received: from [140.186.70.92] (port=51285 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ot9ro-0006WG-H6 for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 21:54:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ot9rl-0007dk-KL for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 21:54:26 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:35802) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ot9rl-0007dX-AL for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 21:54:25 -0400 Received: by bwz6 with SMTP id 6so5909332bwz.0 for ; Tue, 07 Sep 2010 18:54:23 -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: Nick Parker Cc: emacs-orgmode@gnu.org --===============0682005450== Content-Type: multipart/alternative; boundary=001636c5b0ffc2f474048fb5ca84 --001636c5b0ffc2f474048fb5ca84 Content-Type: text/plain; charset=ISO-8859-1 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 > > --001636c5b0ffc2f474048fb5ca84 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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@developernotes.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@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


--001636c5b0ffc2f474048fb5ca84-- --===============0682005450== 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 --===============0682005450==--