[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] org-plot file export options
From: |
Eric Schulte |
Subject: |
Re: [Orgmode] org-plot file export options |
Date: |
Fri, 11 Jun 2010 13:35:52 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
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 <address@hidden> 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/address@hidden/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.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Footnotes:
[1] http://orgmode.org/worg/org-contrib/babel/
[2] http://peter.affenbande.org/gnuplot/
- [Orgmode] org-plot file export options, John Hendy, 2010/06/11
- Re: [Orgmode] org-plot file export options,
Eric Schulte <=
- [OT] gnuplot quality (was Re: [Orgmode] org-plot file export options), Eric S Fraga, 2010/06/12
- Re: [OT] gnuplot quality (was Re: [Orgmode] org-plot file export options), Eric S Fraga, 2010/06/12
- Re: [OT] gnuplot quality (was Re: [Orgmode] org-plot file export options), John Hendy, 2010/06/18
- [Orgmode] Re: [OT] gnuplot quality, Eric Schulte, 2010/06/18
- Re: [OT] gnuplot quality (was Re: [Orgmode] org-plot file export options), Nick Dokos, 2010/06/18
- Re: [OT] gnuplot quality (was Re: [Orgmode] org-plot file export options), John Hendy, 2010/06/18
- Re: [OT] gnuplot quality (was Re: [Orgmode] org-plot file export options), John Hendy, 2010/06/12
- [Orgmode] Re: [OT] gnuplot quality, Eric Schulte, 2010/06/12
- [Orgmode] Re: [OT] gnuplot quality, Eric S Fraga, 2010/06/12
- Re: [Orgmode] Re: [OT] gnuplot quality, Alan E. Davis, 2010/06/12