title: How to change the size of legend-box and size of fonts inside a legend box?
body: <p>I need to contruct a figure with at least 12 plots in gnuplot epslatex terminal.
  The problem is when number of plots becomes larger, the size of legend box becomes larger and it gets overlapped with the plots. How can I control the font size inside a legend box and also the size and positioning of the legend box? My gnuplot script is as below. After compilation of script file , the tex file which is produced could not be compiled.Please advise.</p>
  
  <p>Gnuplot script:</p>
  
  <pre><code>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
  </code></pre>