gnuplot-将鼠标设置为自定义格式

gnuplot-将鼠标设置为自定义格式,gnuplot,Gnuplot,set mouse的文档显示了可能影响鼠标行为的以下格式,在这种情况下,在左下角显示鼠标指针坐标时使用了正确的格式: 0 real coordinates in brackets e.g. [1.23, 2.45] 1 real coordinates w/o brackets e.g. 1.23, 2.45 2 x == timefmt [(as set by `set timefmt`), 2.45] 3 x == date

set mouse
的文档显示了可能影响鼠标行为的以下格式,在这种情况下,在左下角显示鼠标指针坐标时使用了正确的格式:

0   real coordinates in  brackets e.g. [1.23, 2.45]
1   real coordinates w/o brackets e.g.  1.23, 2.45
2   x == timefmt                       [(as set by `set timefmt`), 2.45]
3   x == date                          [31. 12. 1999, 2.45]
4   x == time                          [23:59, 2.45]
5   x == date / time                   [31. 12. 1999 23:59, 2.45]
6   alt. format, specified as string   ""
但以下两次尝试设置自定义格式的结果是错误的
第0行:错误的选项

gnuplot -p -e 'set datafile separator ",";
            set xdata time;
            set timefmt "%m/%d/%y %H:%M";
            set format x "%d/%H:%M";
            set mouse mouseformat "mouse = %y/%m/%d %H:%M";
            set autoscale xfix;
            plot "rec-center-hourly.csv" using 1:2 every ::3::616 with lines'

gnuplot -p -e 'set datafile separator ",";
            set xdata time;
            set timefmt "%m/%d/%y %H:%M";
            set format x "%d/%H:%M";
            set mouse mouseformat "%y/%m/%d %H:%M";
            set autoscale xfix;
            plot "rec-center-hourly.csv" using 1:2 every ::3::616 with lines'
我也试过从交互式解释器运行它:

└──> gnuplot -p
Terminal type set to 'wxt'
gnuplot> set datafile separator ",";
gnuplot> set xdata time;
gnuplot> set timefmt "%m/%d/%y %H:%M";
gnuplot> set format x "%d/%H:%M";
gnuplot> set mouse mouseformat "mouse = %y/%m/%d %H:%M";
gnuplot> set autoscale xfix;
gnuplot> plot "rec-center-hourly.csv" using 1:2 every ::3::616 with lines

└──> gnuplot -p
gnuplot> set datafile separator ",";
gnuplot> set xdata time;
gnuplot> set timefmt "%m/%d/%y %H:%M";
gnuplot> set format x "%d/%H:%M";
gnuplot> set mouse mouseformat "%y/%m/%d %H:%M";
gnuplot> set autoscale xfix;
gnuplot> plot "rec-center-hourly.csv" using 1:2 every ::3::616 with lines
然后显示图形,但在左下角是:
鼠标=%y/参数列表太长/7827416%H:M
而不是坐标

我还注意到了另一个奇怪的行为,这里是上述页面的摘录:

1   real coordinates w/o brackets e.g.  1.23, 2.45
2   x == timefmt                       [(as set by `set timefmt`), 2.45]
3   x == date                          [31. 12. 1999, 2.45]
似乎由于某种原因,
set mouse mouseformat X
命令的数字发生了移动:

在我的机器中,以下设置
timefmt
和not
date

gnuplot -p -e 'set datafile separator ",";
            set xdata time;
            set timefmt "%m/%d/%y %H:%M";
            set format x "%d/%H:%M";
            set mouse mouseformat 3;
            set autoscale xfix;
            plot "rec-center-hourly.csv" using 1:2 every ::3::616 with lines'
以及以下不带括号的
真实坐标集,例如1.23、2.45
和非
timemt

gnuplot -p -e 'set datafile separator ",";
            set xdata time;
            set timefmt "%m/%d/%y %H:%M";
            set format x "%d/%H:%M";
            set mouse mouseformat 2;
            set autoscale xfix;
            plot "rec-center-hourly.csv" using 1:2 every ::3::616 with lines'    

根据v5.0文档,预定义格式适用于
mouseformat

Use set mouse mouseformat "" to turn this string off again.
The following formats are available:
0 default (same as 1)
1 axis coordinates 1.23, 2.45
2 graph coordinates (from 0 to 1) /0.00, 1.00/
3 x = timefmt y = axis [(as set by ‘set timefmt‘), 2.45]
4 x = date y = axis [31. 12. 1999, 2.45]
5 x = time y = axis [23:59, 2.45]
6 x = date time y = axis [31. 12. 1999 23:59, 2.45]
7 format from ‘set mouse mouseformat‘, e.g. "mouse x,y = 1.23, 2.450"
我举了一个例子:

set timefmt '%Y-%m-%dT%H:%M:%S'
set mouse mouseformat 3


如果我用
设置鼠标格式3
尝试,我也会得到
错误选项
错误。

有几件事:要更改左下角显示的值,请使用
设置鼠标格式
设置鼠标格式
更改单击某处时显示的标签的外观。接下来,文档说,这个格式被赋予了
sprintf
,它不理解时间格式,只需要两个格式说明符,用于
x
y
。关于转换:在4.6文档中,它说,
3
为您提供了
timemt
。请注意,您链接的文档来自4.2!你好,克里斯托夫,所以在
格式中没有办法让左下角有%y/%m/%d%H:%m“
格式?恐怕没有。你试过使用
设置鼠标格式1
?`这应该给你与轴相同的格式。也许这是一个选项。它给了我
错误的选项