gnuplot 可以使用非规范化科学计数法来标记轴刻度吗?

Can gnuplot use non-normalised scientific notation to label axis ticks?

我有一个由 gnuplot 4.4 在 Centos 6.6 上生成的绘图,其 Y 轴具有自动生成的刻度,带有以下标签:

1.9e-05
1.8e-05
1.7e-05
1.6e-05
1.5e-05
1.4e-05
1.3e-05
1.2e-05
1.1e-05
  1e-05
  9e-06

是否可以在 gnuplot 脚本中要求轴具有一致的指数?像这样:

19e-06
18e-06
17e-06
16e-06
15e-06
14e-06
13e-06
12e-06
11e-06
10e-06
 9e-06

我认为这会使值更易于阅读和一目了然地理解。

我确实意识到科学计数法通常是 normalised,因此系数位于 [0,1] 范围内。我想关闭它。

Gnuplot 无法自动执行此操作。您需要 select 所需的指数,适当缩放数据并手动将指数添加到以下格式:

exponent = -6
set format y '%.0f'.sprintf('e%d', exponent)
scale = 10**(-exponent)
plot 'data.dat' using 1:(*scale)

编辑:对于您的具体示例,您可以使用 gnuplots 能力来使用科学权力(三的倍数):

set terminal pngcairo enhanced font 'DejaVu Sans'
set encoding utf8
set format y '%.0s✕10^{%S}'
set xrange [9:19]
plot 1e-6*x

注意,这里只有乘号✕(U+2715)需要utf8编码。 gnuplot 4.4.4 的输出是