gnuplot 中的 LaTeX 公式
LaTeX formula in gnuplot
我需要在键中写 LaTeX 表达式,例如 V_x 在 epslatex 终端中没有斜体。
我试过 $\text{V}_{\text{x}}$
但它没有提供所需的输出。有没有使用 gnuplot 的方程式?以下是我的完整脚本
set terminal epslatex color standalone size 5.0in,5.25in
set output 'output.tex'
pl 'file.txt' u (-1):((-21.5) w p pt 5 ps 1.0 lc 7 title '\text{V}_{\text{x}}=0.6'
unset out
set out
system('latex output.tex && dvips output.dvi && ps2pdf output.ps')
system('mv output.ps out2.eps')
unset terminal
set out
1) 插入缺少的右括号 2) 在 TeX 数学片段周围添加 $...$ 3) 如果您没有使用 amsmath 包,将 \text 更改为 \textrm:
pl 'file.txt' u (-1):((-21.5)) w p pt 5 ps 1.0 lc 7 title '$\text{V}_{\text{x}}=0.6$',\
'file.txt' w p pt 6 title '$\textrm{V}_{\textrm{x}}=0.6$'
我需要在键中写 LaTeX 表达式,例如 V_x 在 epslatex 终端中没有斜体。
我试过 $\text{V}_{\text{x}}$
但它没有提供所需的输出。有没有使用 gnuplot 的方程式?以下是我的完整脚本
set terminal epslatex color standalone size 5.0in,5.25in
set output 'output.tex'
pl 'file.txt' u (-1):((-21.5) w p pt 5 ps 1.0 lc 7 title '\text{V}_{\text{x}}=0.6'
unset out
set out
system('latex output.tex && dvips output.dvi && ps2pdf output.ps')
system('mv output.ps out2.eps')
unset terminal
set out
1) 插入缺少的右括号 2) 在 TeX 数学片段周围添加 $...$ 3) 如果您没有使用 amsmath 包,将 \text 更改为 \textrm:
pl 'file.txt' u (-1):((-21.5)) w p pt 5 ps 1.0 lc 7 title '$\text{V}_{\text{x}}=0.6$',\
'file.txt' w p pt 6 title '$\textrm{V}_{\textrm{x}}=0.6$'