From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: org-plot file export options Date: Fri, 11 Jun 2010 13:35:52 -0700 Message-ID: <87eigde28n.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=59888 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ONAxK-0007Wm-52 for emacs-orgmode@gnu.org; Fri, 11 Jun 2010 16:35:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ONAxI-0002aV-HE for emacs-orgmode@gnu.org; Fri, 11 Jun 2010 16:35:58 -0400 Received: from mail-pw0-f41.google.com ([209.85.160.41]:57036) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ONAxI-0002aM-9J for emacs-orgmode@gnu.org; Fri, 11 Jun 2010 16:35:56 -0400 Received: by pwi7 with SMTP id 7so1943974pwi.0 for ; Fri, 11 Jun 2010 13:35:55 -0700 (PDT) In-Reply-To: (John Hendy's message of "Fri, 11 Jun 2010 15:12:00 -0500") 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: John Hendy Cc: emacs-orgmode 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 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/