Gnuplot 标签中的 Epslatex 终端在屏幕外
Epslatex terminal in gnuplot labels out of screen
我正在 gnuplot 的 epslatex 终端中绘制数据集。代码如下
set terminal epslatex color colortext standalone font 10 header \
'\usepackage{amssymb, amsmath, mathtools, breqn, amsthm, mathrsfs}'
set out 'fit.tex'
set key top right box height 0.3
unset border
set style line 123 dt 2 lc 'gray'
set grid linestyle 123
##----->LABELS##
set title '$\ln{\left(\dfrac{P}{P_0}\right)}$ vs $\dfrac{1}{T}$'
set xlabel '$\dfrac{1}{T}$ (K$^{-1}$)'
set ylabel '$\ln{\left(\dfrac{P}{P_0}\right)}$'
##----->FIT##
f(x) = m * x + q
fit f(x) 'asc.txt' u 1:2:3:4 xyerrors via m, q
##----->PLOT##
p 'asc.txt' u 1:2:3:4 w xyerrorbars t 'data', f(x) t 'Fit'
set out
我得到的输出是下面的
如您所见,标签超出了 canvas。我怎么解决这个问题?
有时 gnuplot 无法估计文本元素的宽度或高度。您可以手动增加左侧和底部标签的 space:
set lmargin at screen 0.17
set bmargin at screen 0.17
玩数字。
为了完整起见,rmargin
和 tmargin
也可以根据需要进行调整。
我正在 gnuplot 的 epslatex 终端中绘制数据集。代码如下
set terminal epslatex color colortext standalone font 10 header \
'\usepackage{amssymb, amsmath, mathtools, breqn, amsthm, mathrsfs}'
set out 'fit.tex'
set key top right box height 0.3
unset border
set style line 123 dt 2 lc 'gray'
set grid linestyle 123
##----->LABELS##
set title '$\ln{\left(\dfrac{P}{P_0}\right)}$ vs $\dfrac{1}{T}$'
set xlabel '$\dfrac{1}{T}$ (K$^{-1}$)'
set ylabel '$\ln{\left(\dfrac{P}{P_0}\right)}$'
##----->FIT##
f(x) = m * x + q
fit f(x) 'asc.txt' u 1:2:3:4 xyerrors via m, q
##----->PLOT##
p 'asc.txt' u 1:2:3:4 w xyerrorbars t 'data', f(x) t 'Fit'
set out
我得到的输出是下面的
如您所见,标签超出了 canvas。我怎么解决这个问题?
有时 gnuplot 无法估计文本元素的宽度或高度。您可以手动增加左侧和底部标签的 space:
set lmargin at screen 0.17
set bmargin at screen 0.17
玩数字。
为了完整起见,rmargin
和 tmargin
也可以根据需要进行调整。