Reputation: 551
I'm plotting a dataset in gnuplot's epslatex terminal. the code is the one below
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
And the output that i get is the one below
As you can see the labels are out of the canvas. How can I solve this problem?
Upvotes: 1
Views: 535
Reputation: 4218
Sometimes gnuplot fails to estimate the width or height of text elements. You can manually increase the space for the labels on the left side and on bottom:
set lmargin at screen 0.17
set bmargin at screen 0.17
Play with the numbers.
For completeness, also rmargin
and tmargin
can be adjusted if necessary.
Upvotes: 1