Disable scientific notation in Gnuplot

In gnuplot, I turned on logscale for the axis y, which gives me 1up 1,000,000. However, the sign 1,000,000appears in scientific notation. It stands out from its singular in this form. I would like it to be written as 1000000. All of my Google searches for disabling scientific notation, formatting as decimal, or increasing ytics space have yielded nothing that solves my problem.

+4
source share
1 answer

Axes format is set either by using set format xeither set xtics format(equivalent commands to y, z, x2, y2and cbexist).

Use show formatto find out which format is the default (result for 4.6.6, starting with 5.0 by default % h)

gnuplot> show format
    tic format is: 
      x-axis: "% g"
      ...

%g- gnuplot format specifier, but works similarly to the C format specifiers used for sprintfand similar functions. Definition %gaccording to gnuplot documentation: "shorter %eand %f". This is why the format can change for one axis.

So finally, to switch to a fixed format for all ticks, use, for example,

set format y '%.0f'
+5
source

Source: https://habr.com/ru/post/1612463/


All Articles