Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn Off Scientific Notation In Gnuplot

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.

like image 359
user3642765 Avatar asked Oct 20 '15 15:10

user3642765


1 Answers

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'
like image 107
Christoph Avatar answered Nov 10 '22 17:11

Christoph