Search code examples
labelgnuplot

Gnuplot math bold symbols


I would like to set bold labels in my graph. I use the latex enviroment to set formula at the labels between $ symbols, hovwer the usual \boldsymbol{} doesn't work.

set terminal epslatex standalone color size 4.0in,3.0in background rgb "white" font "Helvetica,10"

set output 'latex.tex'

f(x) = x + 2*sin(x)
set xrange [0:10]

set xlabel '$t$'
set ylabel '$\boldsymbol{q} \cdot n$'
plot f(x)

Solution

  • You should add to your latex file:

    \usepackage{amsmath}

    You can do this from gnuplot by using the header option of epslatex:

    set terminal epslatex standalone color size 4.0in,3.0in background rgb "white" font "Helvetica,10" header '\usepackage{amsmath}'