I'm trying to use gnuplot to plot data on semilog axes. The problem is
that the plot that is output has excessive space between the y-axis label
and the y-axis tick mark labels -- the actual plot is taking up less than
half the horizontal space available.
I'm using the following command file to generate the plot:
set nokey
set xlabel "VOLTAGE (V)"
set ylabel "CURRENT (mA)"
set logscale y
set xtics -15,5,15
set ytics 1e-10,10000,1e2
set format y "10^{%T}"
set grid 0
set terminal postscript eps enhanced 40
set output "DCFN2.eps"
plot [0:15] [1e-10:1e2] "DCFN1.dat" with lines lt 1, "DCFN3.dat" with
lines lt 1, "DCFN4.dat" with lines lt 1
The problem seems to lie with the 'format' statement: if I use for
example 'format y "%g"' there is no extra space, but this format looks
kinda dumb with a log scale.
I am using unix version 3.5 (pre 3.6) patchlevel beta 325 on an HP/UX
system.
Thanks for any assistance..
>
> Hi,
>
> I'm trying to use gnuplot to plot data on semilog axes. The problem is
> that the plot that is output has excessive space between the y-axis label
> and the y-axis tick mark labels -- the actual plot is taking up less than
> half the horizontal space available.
>
> I'm using the following command file to generate the plot:
>
> set nokey
> set xlabel "VOLTAGE (V)"
#here you can add some space for the label with:
> set ylabel "CURRENT (mA)" +2
maybe you ll have to play with the value
> set logscale y
> set xtics -15,5,15
> set ytics 1e-10,10000,1e2
> set format y "10^{%T}"
> set grid 0
> set terminal postscript eps enhanced 40
> set output "DCFN2.eps"
> plot [0:15] [1e-10:1e2] "DCFN1.dat" with lines lt 1, "DCFN3.dat" with
> lines lt 1, "DCFN4.dat" with lines lt 1
bye
Henning Saggau Hans-Meerwein-Str.
Institut fuer Physikalische-, 35032 Marburg
Kern und Makromolekulare Chemie Germany
Tel.: (49)6421-28 2369 Fax: (49)6421-28 8916
> I'm trying to use gnuplot to plot data on semilog axes. The problem is
> that the plot that is output has excessive space between the y-axis label
> and the y-axis tick mark labels -- the actual plot is taking up less than
> half the horizontal space available.
>
> I'm using the following command file to generate the plot:
>
> set nokey
> set xlabel "VOLTAGE (V)"
> set ylabel "CURRENT (mA)"
> set logscale y
> set xtics -15,5,15
> set ytics 1e-10,10000,1e2
> set format y "10^{%T}"
> set grid 0
> set terminal postscript eps enhanced 40
> set output "DCFN2.eps"
> plot [0:15] [1e-10:1e2] "DCFN1.dat" with lines lt 1, "DCFN3.dat" with
> lines lt 1, "DCFN4.dat" with lines lt 1
>
>
> The problem seems to lie with the 'format' statement: if I use for
> example 'format y "%g"' there is no extra space, but this format looks
> kinda dumb with a log scale.
>
> I am using unix version 3.5 (pre 3.6) patchlevel beta 325 on an HP/UX
> system.
What seems to be happening is that the amount of space reserved for the tic
labels is computed using the "%g" format instead of the specified one. If
this is indeed the case, it's a bug.
The workaround is to set the margin width explicitly and (perhaps) use an
offset with the ylabel:
set lmargin 7
set ylabel "CURRENT (mA)" 1,0
For both of these commands the unit for the numbers is the character width
(or height, in the case of the top or bottom margin and the y-offset).
Dick Crawford, aka rccra...@lanl.gov