From: "Eric Schulte" <schulte.eric@gmail.com>
To: John Hendy <jw.hendy@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: org-plot file export options
Date: Fri, 11 Jun 2010 13:35:52 -0700 [thread overview]
Message-ID: <87eigde28n.fsf@gmail.com> (raw)
In-Reply-To: <AANLkTint5XLi1WrnaCXKGIq_32dTQ5R1s-k6CF96gmhE@mail.gmail.com> (John Hendy's message of "Fri, 11 Jun 2010 15:12:00 -0500")
Hi John,
If you're going to be doing anything complicated with your plots you may
want to try using org-babel [1] rather than using org-plot.
The following should Org-babel alternative should work.
1) ensure org-babel in installed on your system, and gnuplot is
activated.
;; Org-babel
(require 'org-babel-init)
(require 'org-babel-gnuplot)
2) Name your table with a #+tblname: just before the start of your table
line, e.g.
#+tblname: formulation-viscosities
| your table contents | go right here |
3) create a gnuplot code block, which takes your table as an argument
and plots it to a file, notice `:var' and `:file' the header
arguments
#+begin_src gnuplot :var data=formulation-viscosities :file ~/Desktop/test.jpg
set terminal jpg transparent nocrop enhanced font arial 8
set xlabel 'Temperature (C)'
set ylabel 'Viscosity (cP)
set title 'Formulation Viscosities'
plot "$data" with lines
#+end_src
WRT: the ugliness of gnuplot to file, I've wrestled with this myself and
I know exactly what you mean. Currently I try to use svg or png images
when exporting to html, and for pdf I use the gnuplot tikz terminal [2].
Gnuplot in combination with tikz results in *beautiful* plots, which
render and resize well. However it took me hours to get everything
configured, so it may not be for everyone.
Good Luck -- Eric
John Hendy <jw.hendy@gmail.com> writes:
> Hi,
>
>
> A couple questions:
>
> My current plot options are as follows:
> #+PLOT: title:"Formulation Viscosities" ind:1 type:2d with:lines
> #+PLOT: set:"xlabel 'Temperature (C)'" set:"ylabel 'Viscosity (cP)'"
>
> 1) I've been trying to output a file and can only manage to get PNGs to
> work.
> --- I've tried the recommendations here:
> http://www.mail-archive.com/emacs-orgmode@gnu.org/msg07825.html
> --- In other words, I've used the given examples from Eric of:
>
> #+PLOT: file:"~/Desktop/test.jpg"
>
> As well as:
>
> #+PLOT set:"terminal jpg transparent nocrop enhanced font arial 8"
> #+PLOT set:"output '~/Desktop/test.jpg'"
>
> And both resultant files don't open in Evince or Gimp.
>
> I've also tried the options from Wikipedia on plotting, found here:
> http://en.wikipedia.org/wiki/Wikipedia%3AHow_to_create_graphs_for_Wikipedia_articles
> --- That article seems to recommend svg or ps format, later modified
> with Gimp or another program for use
>
>
> 2) How does one generate better quality with gnuplot? The one thing
> that does work is simply #+PLOT: file:"~/Desktop/test.png" but the
> resultant file is unacceptable
> for my report. The letters look very pixelated. My questions above are
> actually asked because I need to get a handle on how to generate a
> better graph for my report...
> --- The text is pretty bad and using #+PLOT: set:"terminal fsize #"
> doesn't seem to change this. Is my syntax bad? I was working from this
> option from the wiki linked above:
>
> set terminal svg enhanced size 1000 1000 fname "Times" fsize 36
>
>
> Thanks!
> John
> _______________________________________________
> 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
Footnotes:
[1] http://orgmode.org/worg/org-contrib/babel/
[2] http://peter.affenbande.org/gnuplot/
next prev parent reply other threads:[~2010-06-11 20:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-11 20:12 org-plot file export options John Hendy
2010-06-11 20:35 ` Eric Schulte [this message]
2010-06-12 10:17 ` [OT] gnuplot quality (was Re: org-plot file export options) Eric S Fraga
2010-06-12 10:24 ` Eric S Fraga
2010-06-18 20:43 ` John Hendy
2010-06-18 21:00 ` [OT] gnuplot quality Eric Schulte
2010-06-18 21:13 ` [OT] gnuplot quality (was Re: org-plot file export options) Nick Dokos
2010-06-18 22:04 ` John Hendy
2010-06-12 15:18 ` John Hendy
2010-06-12 15:23 ` [OT] gnuplot quality Eric Schulte
2010-06-12 20:16 ` Eric S Fraga
2010-06-13 2:35 ` Alan E. Davis
2010-06-13 10:03 ` [OT] what about asymptote ? Nicolas Goaziou
2010-06-13 16:31 ` Eric Schulte
2010-06-13 17:48 ` Nicolas Goaziou
2010-06-15 13:35 ` [babel] Re: Re: [OT] gnuplot quality Eric S Fraga
2010-06-15 15:30 ` Eric Schulte
2010-06-16 10:27 ` Štěpán Němec
2010-06-17 3:07 ` Alan E. Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eigde28n.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=jw.hendy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.