Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

All gnuplot examples on http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html 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

2 Answers 2

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)

#!/bin/sh
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.