triadaval.blogg.se

Latex gnuplot
Latex gnuplot




latex gnuplot

Using the eps terminal is much better, and we can easily convert the file by

#Latex gnuplot pdf

In principle, one could use the pdf terminal of gnuplot, but the eps terminal is much more mature, and the end result with pdf is far from the expected. If you want to compile with pdflatex, first you have to convert the postscript file to pdf. You should create a LaTeX file, which includes nothing but the file that we have just produced, errorf.tex. So, let us suppose for the moment that you want to work with postscript, and not with pdf.

latex gnuplot

The destination is the same in both cases. We then have got to combine these two by invoking LaTeX or pdflatex, depending on the exact route you would like to follow. (At this point, I would also recommend re-setting the terminal, otherwise, there is no guarantee that gnuplot has closed both your output files, and this could create some trouble later on.) errorf.eps will contain the "visual" part of the graph, i.e., the axes, tics, points, lines, arrows and the like, while errorf.tex holds all the typographic elements. Set label 1 at -2, 0.5 "$erf(x) = \\frac etc.Īnd replot your graph, you will get two files. For the sake of example, we will plot error function, and write its definition on the figure as follows: As always, first we have to set our terminal asĪt this point, we can set labels with any LaTeX symbols, the generated output will contain it properly. In cases like this, we can make use of the epslatex terminal.

latex gnuplot

While some terminals have an enhanced version, where some symbols can be written, (you can find the availble symbols in Dick Crawford's postscript guide.) it is not always enough. There are cases when a couple of special symbols are needed in a graph, e.g., when a formula is to be written on top of the curves. The epslatex terminal The epslatex terminal






Latex gnuplot