gnuplot-ytics表示法,如Matlab

gnuplot-ytics表示法,如Matlab,gnuplot,Gnuplot,我想用gnuplot设置ytics符号,如下图所示(图形框上只有一个x10^-5)。可能吗 您当然可以在gnuplot中手动执行此操作,使用许多终端的增强型选项并设置标签: set terminal pngcairo enhanced set output "out.png" set tmargin at screen 0.95 set label at graph 0,1.05 left 'x 10^{-5}' plot x 但请注意,您还必须手动缩放y轴,例如,在本例中,通过将函数的输出

我想用gnuplot设置ytics符号,如下图所示(图形框上只有一个x10^-5)。可能吗

您当然可以在gnuplot中手动执行此操作,使用许多终端的
增强型
选项并设置
标签

set terminal pngcairo enhanced
set output "out.png"
set tmargin at screen 0.95
set label at graph 0,1.05 left 'x 10^{-5}'
plot x

但请注意,您还必须手动缩放y轴,例如,在本例中,通过将函数的输出
f(x)
缩放为
1e5*f(x)

如果使用latex终端,则只需对标签使用latex语法:
set label…'$\乘以10^{-5}$'


如果这对您来说还不够,那么其他人可能会提供更自动化的解决方案。

更自动化的解决方案是使用
未知
终端来估计自动缩放的Y范围限制,计算数量级,设置比例并回复:

set terminal push
set terminal unknown
scale = 1.0
plot 'data.dat' using 1:($2/scale) w lp
set terminal pop

max(x,y) = (x > y ? x : y)
exponent = log10(max(abs(GPVAL_Y_MAX), abs(GPVAL_Y_MIN)))
oom = (ceil(exponent) == exponent ? exponent : ceil(exponent) - 1)
scale = 10**oom
set encoding utf8
set label left at graph 0, graph 1.05 sprintf('✕ 10^{%d}', int(oom)) enhanced

set tmargin 4
replot

谢谢(+1)。现在我将使用这个解决方案。有一天我会等待一个自动的解决方案,然后我会接受你的回答(对不起我的英语不好)@ddg当然,没问题,我还想知道是否有其他方法可以解决这个问题。