excluding a tic number in scientific format

2020-04-10 03:15发布

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.

标签: gnuplot
1条回答
Fickle 薄情
2楼-- · 2020-04-10 03:51

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

查看更多
登录 后发表回答