emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Babel, gnuplot, post processing
@ 2012-05-11 15:57 skip
  2012-05-11 20:43 ` Eric Schulte
  2012-05-12  7:58 ` Eric Fraga
  0 siblings, 2 replies; 4+ messages in thread
From: skip @ 2012-05-11 15:57 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Babel, gnuplot, post processing
  2012-05-11 15:57 Babel, gnuplot, post processing skip
@ 2012-05-11 20:43 ` Eric Schulte
  2012-05-12  7:58 ` Eric Fraga
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Schulte @ 2012-05-11 20:43 UTC (permalink / raw)
  To: skip; +Cc: emacs-orgmode

skip <scp0801@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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Babel, gnuplot, post processing
  2012-05-11 15:57 Babel, gnuplot, post processing skip
  2012-05-11 20:43 ` Eric Schulte
@ 2012-05-12  7:58 ` Eric Fraga
  2012-05-13 22:37   ` skip
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Fraga @ 2012-05-12  7:58 UTC (permalink / raw)
  To: skip; +Cc: emacs-orgmode

skip <scp0801@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Babel, gnuplot, post processing
  2012-05-12  7:58 ` Eric Fraga
@ 2012-05-13 22:37   ` skip
  0 siblings, 0 replies; 4+ messages in thread
From: skip @ 2012-05-13 22:37 UTC (permalink / raw)
  To: skip, emacs-orgmode

On Sat, May 12, 2012 at 12:58 AM, Eric Fraga <e.fraga@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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-13 22:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-11 15:57 Babel, gnuplot, post processing skip
2012-05-11 20:43 ` Eric Schulte
2012-05-12  7:58 ` Eric Fraga
2012-05-13 22:37   ` skip

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).