From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: org-babel and gnuplot Date: Wed, 8 Sep 2010 09:39:46 -0500 Message-ID: References: <4C870290.30701@ccbr.umn.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1723920350==" Return-path: Received: from [140.186.70.92] (port=33053 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtLoT-0000fc-R3 for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 10:39:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtLoS-0002Gc-D8 for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 10:39:49 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:49474) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtLoS-0002GR-5G for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 10:39:48 -0400 Received: by bwz6 with SMTP id 6so191520bwz.0 for ; Wed, 08 Sep 2010 07:39:46 -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 --===============1723920350== Content-Type: multipart/alternative; boundary=0016e6d7e93d2d269e048fc07cac --0016e6d7e93d2d269e048fc07cac Content-Type: text/plain; charset=ISO-8859-1 Nick, This got me curious to see the output. I tried to generate it on my computer and get this in the *gnuplot* buffer after running the code: ----- gnuplot> plot data using 1:2:3 notitle ^ warning: Skipping data file with no valid points ^ x range is invalid ----- This is working for you, though? #+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 John On Wed, Sep 8, 2010 at 8:10 AM, Nick Parker wrote: > Erik, > > That was the issue, the :file reference needed to be on the line above. > Thanks. > > > Nick Parker > www.developernotes.com > > > On Tue, Sep 7, 2010 at 10:27 PM, Erik Iverson wrote: > >> On 09/07/2010 10:12 PM, Nick Parker wrote: >> >>> 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. >>> >> >> AFAIK, you can't break source code header argument lines across >> multiple lines. Is that how you actually have it in your >> org file? >> >> >> #+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 >>> >>> >>> >>> >>> >>> _______________________________________________ >>> 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 >>> >> >> > --0016e6d7e93d2d269e048fc07cac Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Nick,


This got me curious to see the outp= ut. I tried to generate it on my computer and get this in the *gnuplot* buf= fer after running the code:

-----
gnuplot> plot data using 1:2:3 notitle
=A0=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^
=A0=A0 =A0 =A0 =A0 warn= ing: Skipping data file with no valid points
=A0=A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0^
=A0= =A0 =A0 =A0 =A0 x range is invalid
-----

This is working for you, though?
<= br>
#+tblname: sessions
| Date =A0 =A0 =A0 | =A0Ti= me | Distance |
|------------+-------+----------|
| 09/= 02/2010 | 15:13 | =A0 =A0 =A02.5 |
| 09/01/2010 | 14:00 | =A0 =A0 =A02.4 |

#+beg= in_src gnuplot :var data=3Dsessions :file org-running.png :exports both
=A0=A0set title "Running Stats"
=A0=A0set auto x=
=A0=A0set style data histogram
=A0=A0set style fill solid border -1
=A0=A0set boxwidth .9
=A0=A0set xlabel "Date"
=A0=A0set ylabel "= ;Time"
=A0=A0plot data using 1:2:3 notitle
#+end_s= rc


John

On Wed, Sep 8, 2010 at 8:10 AM, Nick Parker <nickp@developernotes.com> wrote:
Erik,

That was the issue= , the :file reference needed to be on the line above. =A0Thanks.
= On Tue, Sep 7, 2010 at 10:27 PM, Erik Iverson <eriki@ccbr.umn.edu>= wrote:
On 09/07/2010 10:12 PM, Nick Parker wrote:
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).
=A0I get an error with the :file notation, though I read that in a sample<= br> babel gnuplot example for generating graphs of commit history on the
org-mode git repository. =A0I tried to reference the variable data without<= br> the quotes and $ sign without any success. =A0I will continue to fiddle
with it, I am new to gnuplot.

AFAIK, you can't break source code header argument lines across
multiple lines. =A0Is that how you actually have it in your
org file?


=A0 =A0 =A0 =A0#+begin_src gnuplot :var data=3Dsessions
=A0 =A0 =A0 =A0 =A0 :file org-running.png :exports both
=A0 =A0 =A0 =A0 =A0 set title "Running Stats"
=A0 =A0 =A0 =A0 =A0 set auto x
=A0 =A0 =A0 =A0 =A0 set style data histogram
=A0 =A0 =A0 =A0 =A0 set style fill solid border -1
=A0 =A0 =A0 =A0 =A0 set boxwidth .9
=A0 =A0 =A0 =A0 =A0 set xlabel "Date"
=A0 =A0 =A0 =A0 =A0 set ylabel "Time"
=A0 =A0 =A0 =A0 =A0 plot "$data" using 1:2:3 notitle
=A0 =A0 =A0 =A0#+end_src

=A0 =A0 =A0 =A0Nick Parker
=A0 =A0 =A0 =A0www.developernotes.com <http://www.developernotes.com>


=A0 =A0 =A0 =A0_______________________________________________
=A0 =A0 =A0 =A0Emacs-orgmode mailing list
=A0 =A0 =A0 =A0Please use `Reply All' to send replies to the list.
=
=A0 =A0 =A0 =A0= Emacs-orgmode@gnu.org <mailto:Emacs-orgmode@gnu.org>



--0016e6d7e93d2d269e048fc07cac-- --===============1723920350== 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 --===============1723920350==--