如何在图例框中更改图例框的大小和字体大小?

7 gnuplot

我需要在gnuplot epslatex终端中构建一个至少有12个图的图形.问题是当图的数量变大时,图例框的大小变大并且与图重叠.如何控制图例框内的字体大小以及图例框的大小和位置?我的gnuplot脚本如下.编译脚本文件后,生成的tex文件无法编译.请指教.

Gnuplot脚本:

reset
set terminal epslatex color colortext size 11cm,7.5cm standalone
set output "obspI=12.tex"

set style data lines
set multiplot
set log


set key samplen 1 left bottom 
set key at 0.02,0.005
set key box lt 1 lc -2 lw 3

set xlabel "$t/N$"
set ylabel '$P_\ell(t)$'

set format y  '$10^{%L}$'
set format x  '$10^{%L}$'

set xr [0.01:1000]
set yr [0.002:1.5] 

plot 'sp_e21_N20I1.dat' u 1:2 w l title '\footnotesize $\ell=1,N=20,E=21$' lc 7 lw 2, \
     'sp_e19_N20I1.dat' u 1:2 w l title '\footnotesize $\ell=1,N=20,E=19$' lc 1 lw 2, \
     'sp_n_N20I1.dat' u 1:2 w l title '\footnotesize $\ell=1,N=20$', \
     'sp_e21_N20I10.dat' u 1:2 w l title '\footnotesize $\ell=10,N=20,E=21$'  lw 2, \
     'sp_e19_N20I10.dat' u 1:2 w l title '\footnotesize $\ell=10,N=20,E=19$'  lw 2, \
     'sp_n_N20I10.dat'   u 1:2 w l title '\footnotesize $\ell=10,N=20$'  lw 2, \
     'sp_e21_N40I1.dat' u 1:2 w l title '\footnotesize $\ell=1,N=40,E=21$'  lw 2, \
     'sp_e19_N40I1.dat' u 1:2 w l title '\footnotesize $\ell=1,N=40,E=19$'  lw 2, \
     'sp_n_N40I1.dat' u 1:2 w l title '\footnotesize $\ell=1,N=40$', \
     'sp_e21_N40I20.dat' u 1:2 w l title '\footnotesize $\ell=20,N=40,E=21$'  lw 2, \
     'sp_e19_N40I20.dat' u 1:2 w l title '\footnotesize $\ell=20,N=40,E=19$'  lw 2, \
     'sp_n_N40I20.dat'   u 1:2 w l title '\footnotesize $\ell=20,N=40$'  lw 2

unset multiplot
set output
Run Code Online (Sandbox Code Playgroud)

mik*_*867 9

关键文本大小(带或不带框)可以通过控制

set key font ",FONT_SIZE"
Run Code Online (Sandbox Code Playgroud)

(例如,FONT_SIZE可以是10.5).

有关定位钥匙箱的信息,请参阅 此处.有很多选择; 您可以使用例如,将键放在主图外面

set key outside
Run Code Online (Sandbox Code Playgroud)

钥匙箱的高度和宽度可以通过"高度"和"宽度"来控制,例如:

set key width -12
Run Code Online (Sandbox Code Playgroud)

希望有所帮助.