如何用Gnuplot演示乳胶配方?
我尝试用Gnuplot 5.0演示乳胶配方。 但我发现有些LaTeX命令不可用 这是我的Gnuplot代码:如何用Gnuplot演示乳胶配方?,gnuplot,Gnuplot,我尝试用Gnuplot 5.0演示乳胶配方。 但我发现有些LaTeX命令不可用 这是我的Gnuplot代码: set termoption enhanced set title "Title test^a \alpha $\alpha$" font "CMU-Serif, 18" set xlabel "Month" set ylabel "Precipitation (mm)" set xrange [0.5: 12.5] set xtics 1,1,12 set key se
set termoption enhanced
set title "Title test^a \alpha $\alpha$" font "CMU-Serif, 18"
set xlabel "Month"
set ylabel "Precipitation (mm)"
set xrange [0.5: 12.5]
set xtics 1,1,12
set key
set pointintervalbox 2
plot "08_Data.dat" using 1:2 with linespoints \
linecolor "#FF7800" linewidth 2 pointtype 7 pointsize 0.75 pointinterval -1 \
title "Beijing",\
"08_Data.dat" using 1:3 with linespoints \
linecolor "#00A0DC" linewidth 2 pointtype 7 pointsize 0.75 pointinterval -1 \
title "Shanghai",
set output
pause (-1)
因此,LaTeX命令test^a
工作正常,但LaTeX\alpha
和$\alpha$
不工作:
这是文件:08_Data.dat:
1 2.5 38.1
2 5.1 58.4
3 10.2 81.3
4 25.4 101.6
5 27.9 114.3
6 71.1 152.4
7 175.3 129.5
8 182.9 132.1
9 48.3 154.9
10 17.8 61.0
11 5.1 50.8
12 2.5 35.6
您是否尝试过在gnuplot代码中直接键入alpha字符?我想gnuplot理解UTF-8
set title "test^a α α" font "CMU-Serif, 18"
plot x
结果:
对不起,那么我误解了你的问题。您是否已选中帮助终端latex?gnuplot“增强文本”模式是latex的替代模式,而不是它上面的一层。如果需要TeX类型设置,请使用基于TeX或latex的gnuplot终端之一,而不是增强型文本终端之一。我建议
set term tikz
set term
也可以工作,您可以轻松地将输出转换为pdf格式that@Ethan@Vladimir非常感谢你!我已经学习了如何使用set term
和set output”test.tex
将.plt转换为.tex。但是我认为这种方法非常麻烦且效率低下。如何直接使用LaTeX公式生成pdf文件。您使用的编辑器是什么?
set term tikz standalone size 7cm, 3cm fontscale 0.6
set ylabel '{\LaTeX\ -- $ \gamma $}'
set xlabel '{\LaTeX\ -- $ x $}'
set output 'example.tex'
plot [0:1] gamma(x) title '$ \gamma(x) $'
unset output
!pdflatex example