gnuplot中的LaTeX公式

问题描述 投票:0回答:1

我需要在密钥中编写LaTeX表达式,类似于在epslatex终端中没有斜体的V_x。

我已经尝试过$\text{V}_{\text{x}}$,但它没有提供所需的输出。无论如何有使用gnuplot的方程式?以下是我的完整脚本

set terminal epslatex color standalone  size 5.0in,5.25in
set output 'output.tex'
pl 'file.txt' u ($2-1):(($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
latex gnuplot
1个回答
0
投票

1)插入缺少的右括号2)在TeX数学片段周围添加$ ... $ 3)如果您不使用amsmath软件包,请将\ text更改为\ textrm:

pl 'file.txt' u ($2-1):(($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$'

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.