From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: [For Worg?] Gnuplot unevenly spaced non-numeric data plot? Date: Mon, 23 Aug 2010 21:44:48 -0500 Message-ID: References: <29278.1282423292@gamaville.dokosmarshall.org> <541.1282432642@gamaville.dokosmarshall.org> <21316.1282576584@gamaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0424309418==" Return-path: Received: from [140.186.70.92] (port=33082 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnjVL-0002Ck-8f for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 22:44:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnjVJ-0004Oc-Sj for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 22:44:51 -0400 Received: from mail-qw0-f41.google.com ([209.85.216.41]:64276) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnjVJ-0004OM-HO for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 22:44:49 -0400 Received: by qwk4 with SMTP id 4so6359514qwk.0 for ; Mon, 23 Aug 2010 19:44:48 -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: nicholas.dokos@hp.com Cc: emacs-orgmode --===============0424309418== Content-Type: multipart/alternative; boundary=90e6ba4fc488a0b35c048e88bf36 --90e6ba4fc488a0b35c048e88bf36 Content-Type: text/plain; charset=ISO-8859-1 Okay, bounced attempts with both .zip and tar. We'll try this instead... the "attached file" mentioned below is here: https://sites.google.com/site/jwhendytank/home/org-gnuplot-writeup.zip ----- > Sorry if this is a duplicate. My first attempt failed, perhaps due to the attached .zip? I'm trying .tar this time. > ----- > Alright Nick, careful what you wish for :) For anyone else who could use this or do something with it: > - Over the weekend I figured out a bunch of stuff with gnuplot > - I modified what I found to make it generic and wrote it up in an org file > - The org file, resultant pics (eps), converted pngs, and exported html/pdf are in the attached .zip *[edit: .tar] [edit: see link above]* > Let me know if this can be useful for worg. There's really nothing new that can't be found, but it's tricky if you don't know what you're looking for. The attached is the result of lots of digging on my part and some excellent help from the mailing list. Included are gnuplot methods for: > - Setting axis titles with the #+PLOT method > - Getting better image quality via eps -> png from a previous mailing list discussion (thanks Eric & Eric) > - The use of the 'reset' command when using multiple gnuplot babel blocks in the same file > - Unevenly spaced names x-tics > - Multiple x-axis scales on the same graph > - Broken axis example from gnuplot-tricks > Again, this info exists elsewhere, but this might be very nice to have on worg. Perhaps this would serve as a nice primer for the beginner? I footnoted everywhere I could to the original sources of my information (mostly the mailing list and gnuplot-tricks blog). > Let me know if I can be of assistance with any edits if this is actually worg-candidate material. I have no idea what the standards are or how this works. > Thanks for all the help! > John > >> >> On Mon, Aug 23, 2010 at 10:16 AM, Nick Dokos wrote: >> >>> John Hendy wrote: >>> >>> > Sounds good. Where would I post the solution? CLOSED: [2010-08-22 Sun >>> 15:44] >>> > >>> >>> I think the list is the proper place: if the question comes up again, >>> then it can be added to Worg. >>> >>> Cheers, >>> Nick >>> >>> > 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 >>> > >>> > _______________________________________________ >>> > 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 >>> >> >> > --90e6ba4fc488a0b35c048e88bf36 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Okay, bounced attempts with both .zip and tar. We'll try this instead..= . the "attached file" mentioned below is here:

https://sites.google.com/site/jwhendytank/home/org-gnuplot-writeup= .zip

-----
Sorry if this is a duplicate. My first attempt failed, perhaps du= e to the attached .zip? I'm trying .tar this time.

-----
Alright = Nick, careful what you wish for :) For anyone else who could use this or do= something with it:

- Over the weekend I figured out a bunch of stuff with gnuplot=
- I modified what I found = to make it generic and wrote it up in an org file
- The org file, resultant pics= (eps), converted pngs, and exported html/pdf are in the attached .zip [= edit: .tar] [edit: see link above]


Let me know i= f this can be useful for worg. There's really nothing new that can'= t be found, but it's tricky if you don't know what you're looki= ng for. The attached is the result of lots of digging on my part and some e= xcellent help from the mailing list. Included are gnuplot methods for:

- Setting axis titles with the #+PLOT method
- Getting better image quality via eps ->= png from a previous mailing list discussion (thanks Eric & Eric)
- The use of the 'reset= 9; command when using multiple gnuplot babel blocks in the same file
- Unevenly spaced names x-tics
- Multiple x-axis scales on the same graph
- Broken axis example from gnuplot-tricks

Again, this info exists elsewhere, but this might be very nice= to have on worg. Perhaps this would serve as a nice primer for the beginne= r? I footnoted everywhere I could to the original sources of my information= (mostly the mailing list and gnuplot-tricks blog).

Let me know if I can be of assistance with any edits if this i= s actually worg-candidate material. I have no idea what the standards are o= r how this works.


Thanks for all the help!
John


On Mon, Aug 23, 2010 at 10:16 AM, Nick Dokos <nicholas.d= okos@hp.com> wrote:
John Hendy <jw.hendy@gmail.com> wrote= :

> Sounds good. Where would I post the solution?=A0=A0CL= OSED: [2010-08-22 Sun 15:44]
>

I think the list is the proper place: if the que= stion comes up again,
then it can be added to Worg.

Cheers,
Nick

> On Sat, Aug 21, 2010 at 6:17 PM, Nick Dokos <nicholas.dokos@hp.com> wrote: >
> =A0 =A0 John Hendy <jw.hendy@gmail.com> wrote:
>
> =A0 =A0 > Problem solved with babel. I was able to get everything I= wanted by
> =A0 =A0 > piecing together some examples from the mailing list and = gnuplot
> =A0 =A0 > examples/manual around the web.
> =A0 =A0 >
>
> =A0 =A0 Good! Maybe you should post the babel solution for future refe= rence.
> =A0 =A0 Here is an org-plot solution for future reference: there is a = script
> =A0 =A0 option that allows you to use an arbitrary gnuplot script. =A0= The org
> =A0 =A0 manual (http://orgmode.org/manual/Org_002dPlot.html#Or= g-Plot) describes
> =A0 =A0 it very well:
>
> =A0 =A0 ,----
> =A0 =A0 | script If you want total control, you can specify a script f= ile (place
> =A0 =A0 | =A0 =A0 =A0 =A0the file name between double-quotes) which wi= ll be used to
> =A0 =A0 | =A0 =A0 =A0 =A0plot. Before plotting, every instance of $dat= afile in the
> =A0 =A0 | =A0 =A0 =A0 =A0specified script will be replaced with the pa= th to the generated
> =A0 =A0 | =A0 =A0 =A0 =A0data file. Note: even if you set this option,= you may still want
> =A0 =A0 | =A0 =A0 =A0 =A0to specify the plot type, as that can impact = the content of the
> =A0 =A0 | =A0 =A0 =A0 =A0data file.
> =A0 =A0 `----
>
> =A0 =A0 foo.org:
> =A0 =A0 --8<---------------cut here---------------start------------= ->8---
> =A0 =A0 #+plot: =A0type:2d script:"myscript.gp"
> =A0 =A0 | 1 | x: where it should be on the scale | y =A0|
> =A0 =A0 |---+------------------------------------+----|
> =A0 =A0 | a | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A00 | 10 |
> =A0 =A0 | b | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 10 | 20 |
> =A0 =A0 | c | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 11 | 30 |
> =A0 =A0 | d | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 40 | 40 |
> =A0 =A0 --8<---------------cut here---------------end--------------= ->8---
>
> =A0 =A0 myscript.gp:
> =A0 =A0 --8<---------------cut here---------------start------------= ->8---
> =A0 =A0 plot '$datafile' using 2:3:xticlabels(1)
> =A0 =A0 --8<---------------cut here---------------end--------------= ->8---
>
> =A0 =A0 Nick
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
>
Emacs-orgmo= de@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode



--90e6ba4fc488a0b35c048e88bf36-- --===============0424309418== 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 --===============0424309418==--