Gnuplot 数学粗体符号

Gnuplot math bold symbols

我想在图表中设置粗体标签。我使用乳胶环境在 $ 符号之间的标签处设置公式,但是通常的 \boldsymbol{} 不起作用。

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)

你应该添加到你的乳胶文件:

\usepackage{amsmath}

您可以使用 epslatexheader 选项从 gnuplot 执行此操作:

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