Reputation: 24617
I have plots I want to generate and include in latex. I'm using the dvi -> pdf typesetting path. Gnuplot provides output "terminals" epslatex, pslatex, pstex, pstricks, texdraw, etc...
I presume one of these is better than using the svg "terminal" and converting to eps manually with inkscape, but I don't know where to start. Kudos if your solution lets me include latex math expressions in my axis labels.
Upvotes: 2
Views: 2377
Reputation: 3348
Exporting to SVG is fine, specially if you plan on manually enhancing the appearance of the plot later with Inkscape. There's a plugin for Inkscape that allows you to introduce LaTeX called textext that is very useful. The following is an example of a curve produced with Gnuplot and later modified with Inkscape+textext:
Lately, I have been very happy with the outcome of Gnuplot's TikZ terminal (see some examples here). This is a feature that as far as I know is only available for the moment in the CVS version of Gnuplot and it is totally worth the effort of compiling it yourself.
Here is a ready to use example of using Gnuplot's TikZ terminal that ought to produce a tex file together with the required style files:
set terminal push
set terminal lua tikz fulldoc createstyle
set output 'sin.tex'
plot sin(x)
unset output
set terminal pop
Upvotes: 2
Reputation: 14023
I would be cautious to use latex terminals. For sure, their results are very good, but depending on the size of data you want to plot and the amount of latex commands issued this could slow down the compilation time of your LaTeX document quite a lot.
If it is possible for you, I would export the plot into an eps or other vector file and include that in your LaTeX document.
On the other hand, if you want to include some freaky features in your plots that only LaTeX offers (after you plotted them with gnuplot), than this is the way to go.
Upvotes: 1