Q:

Keeping significant digits in xrange and yrange axis labeling

I have a yrange that goes from 1.5 to 2.5, but gnuplot displays just "2" instead of "2.0" at that point, i.e., it truncates the ".0"  
How to keep the ".0" from being truncated so that all axis labels show the same number of significant digits?
Thanks!

A:

You can control the format for x (for example) tic labels with the command
set format x "%.2e"

for scientific notation with 2 significant figures after the decimal.  For more info type
help set format

Also note that string printing commands accept format strings, so for instance the code
mynum = 42.2
set title sprintf("My favorite number is %.2e", mynum)

will give the title
"My favorite number is 4.22e+01"

