Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

All gnuplot examples on use the png terminal. However, when exporting to latex I'd rather like to generate vector graphics. Latex terminal seems to be outdated. Eps does not work as a result of how orgmode invokes pdflatex. So which terminal type can I use with org-babel-gnuplot and latex export?

As an alternative question: How can I make org-mode call pdflatex so that it uses the eps graphics?

share|improve this question
You could let gnuplot output data as a table and format it with LaTeX, e.g. with pgfplots. – N.N. Oct 10 '11 at 10:27
@N.N. how would you do that in org-mode? – artistoex Dec 7 '11 at 9:43
@aristoex I dunno how org-mode works. In a normal LaTeX document you can use something like \draw plot[domain=0:5] function{x**2}; within a tikzpicture to draw a part of the function x². – N.N. Dec 7 '11 at 11:50
@artistoex you should be able to start the bounty now with higher rep to give away – Sathya Dec 7 '11 at 12:49
Without knowing anything about your software, do these articles help : Include EPS graphics in pdflatex and org-exp-blocks.el — pre-process blocks when exporting org files ? – harrymc Dec 7 '11 at 15:12

I use the postscript output, and directly convert the output to PDF on the fly. I also change some more things during this, including the default postscript colors (for two color plots, red and blue is better than red and green, since some people are red-green-blind, for example). Another obvious improvement is to run pdfcrop afterwards.

Anyway, the trick is to use the external command syntax for output.

I have a script that looks approximately like this: (actually it is now a python script, for the color substitution)

epstopdf --filter --outfile "$1"
pdfcrop "$1" "$1"

and then in gnuplot I use:

set output "| /home/myself/.bin/gnuplot-to-pdf file.pdf"

I have however no idea how to combine this with org-babel-mode (nor an idea what that is). It could however work with essentially giving the default output file name file.pdf and also specifying this for org-babel-gnuplot?

share|improve this answer
thanks for the answer. unfortunately, the integration into org-babel-gnuplot is my actual problem. – artistoex Dec 11 '11 at 10:43

These articles may help :

Include EPS graphics in pdflatex
org-exp-blocks.el — pre-process blocks when exporting org files

(Not having heard from you, I transformed my comment into an answer.)

share|improve this answer
Does this work for you? – artistoex Dec 12 '11 at 9:46
I don't have the environment for testing it. – harrymc Dec 12 '11 at 10:04
So you suggest using org-exp-blocks instead of org-babel? – artistoex Dec 12 '11 at 10:37
The above are approaches that worked for some people, but may or may not work for you. I can't help you further. – harrymc Dec 12 '11 at 12:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .