gxhints - Graphics conversion hints Wiki
Hints for graphics conversion, gxhconvert script
Brought to you by:
kraused
← TOC | ↑ Home | Gnuplot SVG | → | TeX | TeX | EPS | SVG | PNG | JPEG |
This page shows how to convert a Gnuplot file x.gp into a LaTeX figure you can include into a LaTeX document.
If you want to convert the Gnuplot file into a standalone *.tex file you can process using pdfLaTeX to create a standalone PDF file, see the [Gnuplot to LaTeX document] page instead.
set terminal ... set output ...in Gnuplot files you want to use with gxhconvert.
## width = 10cm ## height = 10cm set xrange [0:10] plot x*x title "\\(y=x^2\\)"The gxhconvert script uses the tikz terminal instead of the usual cairolatex pdf terminal if width and height are specified. Make sure you have installed the "gnuplot-lua-tikz" package for LaTeX.
## terminal = tikz ## terminal setup = solidFor the terminal you can choose either "tikz" or "cairolatex".
set xlabel "\\(\\frac{x}{x_0}\\rightarrow\\)" set ylabel "\\(\\overset{\\uparrow\\vspace{0.3em}}{y}\\)" rotate by 0Note: The \overset instruction requires a line
preamble line = \usepackage{amsmath}in the gxhconvert.conf file in the current working directory.
gxhconvert -o=tex x.gp
Option | Purpose |
---|---|
--pgf | Use the Gnuplot tikz terminal to write PGF instructions into the *.tex output file instead of including a supplemental *-inc.pdf file. |
--eps | Create EPS+TeX file pair instead of a PDF+TeX file. The options --pgf and --eps are mutually exclusive. |
gnuplot -e "set terminal cairolatex pdf input ; set output 'x.tex'" x.gp
gnuplot -e "set terminal cairolatex eps input ; set output 'x.tex'" x.gp
gnuplot -e "set terminal tikz nostandalone plotsize 10cm,7cm ; set output 'x.tex'" x.gp
← TOC | ↑ Home | Gnuplot | → | TeX | TeX | EPS | SVG | PNG | JPEG |