set mouse command的文档显示了以下可能影响鼠标行为的格式,在这种情况下,使用正确的格式在左下角显示鼠标指针坐标:
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 ""但是,在两次尝试设置自定义格式之后,最终出现了错误line 0: wrong option
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然后显示图形,但在左下角是:mouse = %y/Argument list too long/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而不是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'和下面的集合real coordinates w/o brackets e.g. 1.23, 2.45而不是timefmt
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' 发布于 2016-07-26 03:02:45
根据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

https://stackoverflow.com/questions/30367589
复制相似问题