Math within Gnuplot curve title

255 views
Skip to first unread message

PGK

unread,
Jun 16, 2011, 12:39:47 PM6/16/11
to LaTeX Users Group
Hi,

How can I include maths in a Gnuplot curve title? Either of the
following will fail:

plot "file.dat" title "The \pi calculus"

plot "file.dat" title "The $\pi$ calculus"

Many thanks,
--

ramirez

unread,
Jun 17, 2011, 5:12:44 AM6/17/11
to LaTeX Users Group


Hi,

You can use LaTeX in GNUPLOT but, in my experience, it's better to
make all
tunings in the terminal you use (X11 or WXT) where the LaTeX codes are
not
rendered. Once you finish, you have to use other terminal, I prefer

set term epslatex color
set output 'fig.tex'

Now, in my LaTeX file I add

\input{fig.tex}

Enclosed by the proper environment... there you will have all LaTeX
codes
rendered.

Ah! you have to use double backslash the codes... so if you want $\pi$
you have to use $\\pi$ in the GNUPLOT command line.

Ciao,

G.

PGK

unread,
Jun 17, 2011, 7:53:11 AM6/17/11
to LaTeX Users Group
\\ - Perfect!
Reply all
Reply to author
Forward
0 new messages