Re: [O] Babel, gnuplot, post processing

2012-05-13 Thread skip
On Sat, May 12, 2012 at 12:58 AM, Eric Fraga e.fr...@ucl.ac.uk wrote:
 #+begin_src gnuplot :file xxx.pdf
  reset
  clear
  set output 'xxx.eps'
  set terminal postscript eps enhanced 18
  ...
  plot ...
  ! epstopdf xxx.eps
 #+end_src

That is a better solution that what I was struggling with. Thanks.



Re: [O] Babel, gnuplot, post processing

2012-05-12 Thread Eric Fraga
skip scp0...@gmail.com writes:

 How can I perform post processing on eps files produced by gnuplot
 source blocks? I want to take out the extra white space margins in the
 eps file by running eps2eps utility on the eps file produced by
 gnuplot.

The easiest solution (although maybe not the most elegant) is to do this
from within gnuplot.  I do something similar in that I process the eps
to create a pdf.

#+begin_src gnuplot :file xxx.pdf
  reset
  clear
  set output 'xxx.eps'
  set terminal postscript eps enhanced 18
  ...
  plot ...
  ! epstopdf xxx.eps
#+end_src

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-527-gc2aac5




Re: [O] Babel, gnuplot, post processing

2012-05-11 Thread Eric Schulte
skip scp0...@gmail.com writes:

 How can I perform post processing on eps files produced by gnuplot
 source blocks? I want to take out the extra white space margins in the
 eps file by running eps2eps utility on the eps file produced by
 gnuplot.


I believe that if given a :file header argument the gnuplot block will
return the path to the altered file as it's return result.  You could
use a :var header argument to feed this path into a shell script code
block which could call eps2eps on the resulting file.

With this setup, every time the sh code block is evaluated it will call
the gnuplot code block before it is run.  See the relevant manual
chapter for more information.
http://orgmode.org/manual/Working-With-Source-Code.html

Cheers,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/