4

I am using set format x '%.0e' to have x-axis numbers in scientific format. Problem is, the 0 is shown as 0E+00. How can I exclude 0 in scientific format?

Also other number has two digits in their exponential. Instead of 2E+01 I want 2E+1.

mahmood
  • 23,197
  • 49
  • 147
  • 242

1 Answers1

6

To use a different format for the y-axis, use %t (mantissa to base 10) and %T (power to base 10). See the documentation of the 'format specifiers' (or type help format_specifiers).

To change a single entry, you can overwrite the automatic one using set ytics add and using the very same numeric value:

set yrange[0:100]
set xrange[0:100]
set format y '%.0tE%+T'
set ytics add ('0' 0)

plot x

Result (with 4.6.4):

enter image description here

Christoph
  • 47,569
  • 8
  • 87
  • 187