Paam
Paam

Reputation: 141

gnuplot format xK or xM

For the format of x-axis, current I am using the following command in pngcairo terminal:

set format x "%.sK"

Which recognizes numbers from 100K to 900K but when it gets to 1 million it prints "1K" instead of "1000K".

what is the command to automatically set the label to "xK" before 1 million and to "xM" after 1 million?

Upvotes: 1

Views: 370

Answers (1)

Christoph
Christoph

Reputation: 48420

These kind of labels are controlled by gnuplot's own format specifiers (see doc for gprintf):

set format x '%.s%c'

Upvotes: 3

Related Questions