Gnuplot stats min未检测到负数

Gnuplot stats min未检测到负数,gnuplot,Gnuplot,正如您在本文中所看到的,gnuplot stats将列中可用的最小非负数作为最小值 我怎样才能包括负数?我的列有负数,我希望有一个负数作为应用于轴范围的最小值 顺便说一句,我打电话: stats mytextfile u 2:3 nooutput 但事实上,后来我不得不再次调用它,因为我想得到4列中的最小值和最大值。我能马上做吗?还是我必须像我现在做的那样做 stats mytextfile u 2:3 nooutput do whatever stat

正如您在本文中所看到的,gnuplot stats将列中可用的最小非负数作为最小值

我怎样才能包括负数?我的列有负数,我希望有一个负数作为应用于轴范围的最小值

顺便说一句,我打电话:

        stats mytextfile u 2:3 nooutput
但事实上,后来我不得不再次调用它,因为我想得到4列中的最小值和最大值。我能马上做吗?还是我必须像我现在做的那样做

    stats mytextfile u 2:3 nooutput
    do whatever
    stats mytextfile u 4:5 nooutput
    do whatever

对于主要问题,请列出您的范围:

    stats [-9999:9999] mytextfile u 2:3 nooutput

正如您链接到的问答中所述,
stats
将在当前的x和y范围内完成。 因此,如果您有疑问,只需设置范围
[*:*]
,或者
[*:*][*:*][*:*]
(如果您使用两列)。 根据你到底想做什么,你可以以此为出发点

代码:

### stats on several columns
reset session

$Data <<EOD
1  -0.1  -0.2  -0.3  -0.4
2   0.0   0.0   0.0   0.0
3   0.1   0.1   0.1   0.1
4   0.2   0.2   0.2   0.2
5   0.3   0.3   0.3   0.3
6   0.4   0.4   0.4   0.4
7   1.5   2.5   3.5   4.5
EOD

do for [i=2:5] {
    stats [*:*] $Data using i nooutput
    print sprintf("Column %d:  min: % 4g, max: % 4g",i, STATS_min, STATS_max)
}
### end of code
Column 2:  min: -0.1, max:  1.5
Column 3:  min: -0.2, max:  2.5
Column 4:  min: -0.3, max:  3.5
Column 5:  min: -0.4, max:  4.5