In gnuplot I've enabled logscale for my y
axis, which gives me 1
to 1,000,000
. However, the 1,000,000
tick appears in scientific notation. That stands out since its the only number in that form. I'd like to have it written as 1000000
. All of my Google searches for disabling scientific notation, formatting as a decimal, or making the ytics space wider haven't produced anything that solves my problem.
The format of the axis tics is set either with set format x
or set xtics format
(equivalent commands for y
, z
, x2
, y2
and cb
exists as well).
Use show format
to find out, which is the default format (result for 4.6.6, since 5.0 the default is % h
)
gnuplot> show format
tic format is:
x-axis: "% g"
...
%g
is a gnuplot-specific format specifier, but works similar to the C format specifiers used for sprintf
and similar functions. The definition of %g
according to the gnuplot documentation is: "the shorter of %e
and %f
". This is why the format can change for a single axis.
So, finally, to change to a fixed format for all tics, use e.g.
set format y '%.0f'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With