From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Gnuplot unevenly spaced non-numeric data plot? Date: Mon, 23 Aug 2010 09:22:40 -0500 Message-ID: References: <29278.1282423292@gamaville.dokosmarshall.org> <541.1282432642@gamaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1968014411==" Return-path: Received: from [140.186.70.92] (port=38567 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnXvB-00059r-AV for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 10:22:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnXvA-00007n-0n for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 10:22:45 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:44645) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnXv9-00007V-PH for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 10:22:43 -0400 Received: by pxi5 with SMTP id 5so3949188pxi.0 for ; Mon, 23 Aug 2010 07:22:40 -0700 (PDT) In-Reply-To: <541.1282432642@gamaville.dokosmarshall.org> 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: nicholas.dokos@hp.com Cc: emacs-orgmode --===============1968014411== Content-Type: multipart/alternative; boundary=0016364583a28c5e99048e7e61b2 --0016364583a28c5e99048e7e61b2 Content-Type: text/plain; charset=ISO-8859-1 Sounds good. Where would I post the solution? On Sat, Aug 21, 2010 at 6:17 PM, Nick Dokos wrote: > John Hendy wrote: > > > Problem solved with babel. I was able to get everything I wanted by > > piecing together some examples from the mailing list and gnuplot > > examples/manual around the web. > > > > Good! Maybe you should post the babel solution for future reference. > Here is an org-plot solution for future reference: there is a script > option that allows you to use an arbitrary gnuplot script. The org > manual (http://orgmode.org/manual/Org_002dPlot.html#Org-Plot) describes > it very well: > > ,---- > | script If you want total control, you can specify a script file (place > | the file name between double-quotes) which will be used to > | plot. Before plotting, every instance of $datafile in the > | specified script will be replaced with the path to the generated > | data file. Note: even if you set this option, you may still want > | to specify the plot type, as that can impact the content of the > | data file. > `---- > > foo.org: > --8<---------------cut here---------------start------------->8--- > #+plot: type:2d script:"myscript.gp" > | 1 | x: where it should be on the scale | y | > |---+------------------------------------+----| > | a | 0 | 10 | > | b | 10 | 20 | > | c | 11 | 30 | > | d | 40 | 40 | > --8<---------------cut here---------------end--------------->8--- > > myscript.gp: > --8<---------------cut here---------------start------------->8--- > plot '$datafile' using 2:3:xticlabels(1) > --8<---------------cut here---------------end--------------->8--- > > Nick > --0016364583a28c5e99048e7e61b2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sounds good. Where would I post the solution?

On Sat, Aug 21, 2010 at 6:17 PM, Nick Dokos <nicholas.dokos@hp.com> w= rote:
John Hendy <jw.hendy@gmail.com> wrote:

> Problem solved with babel. I was able to get e= verything I wanted by
> piecing together some examples from the mailing list and gnuplot
> examples/manual around the web.
>

Good! Maybe you should post the babel solution for future reference.<= br> Here is an org-plot solution for future reference: there is a script
option that allows you to use an arbitrary gnuplot script. =A0The org
manual (http://orgmode.org/manual/Org_002dPlot.html#Org-Plot) d= escribes
it very well:

,----
| script If you want total control, you can specify a script file (place | =A0 =A0 =A0 =A0the file name between double-quotes) which will be used to=
| =A0 =A0 =A0 =A0plot. Before plotting, every instance of $datafile in the<= br> | =A0 =A0 =A0 =A0specified script will be replaced with the path to the gen= erated
| =A0 =A0 =A0 =A0data file. Note: even if you set this option, you may stil= l want
| =A0 =A0 =A0 =A0to specify the plot type, as that can impact the content o= f the
| =A0 =A0 =A0 =A0data file.
`----

foo.org:
--8<---------------cut here---------------start------------->8---
#+plot: =A0type:2d script:"myscript.gp"
| 1 | x: where it should be on the scale | y =A0|
|---+------------------------------------+----|
| a | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A00 = | 10 |
| b | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 10 | = 20 |
| c | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 11 | = 30 |
| d | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 40 | = 40 |
--8<---------------cut here---------------end--------------->8-= --

myscript.gp:
--8<---------------cut here---------------start------------->8---
plot '$datafile' using 2:3:xticlabels(1)
--8<---------------cut here---------------end--------------->8---

Nick

--0016364583a28c5e99048e7e61b2-- --===============1968014411== 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 --===============1968014411==--