Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
gnuplot超文本无法工作_Gnuplot - Fatal编程技术网

gnuplot超文本无法工作

gnuplot超文本无法工作,gnuplot,Gnuplot,我有下面的gnuplot脚本,我试图在鼠标悬停在绘图点上时显示第三列 set title "Cloud" set xlabel "Date" set ylabel "Number" filename ='data.dat' stats filename using 4 nooutput set xdata time set timefmt '%Y-%m-%d' set format x '%Y' rand_x(x) = x + 60*60*24*7 * (rand(0) - 0.5) ra

我有下面的gnuplot脚本,我试图在鼠标悬停在绘图点上时显示第三列

set title "Cloud"
set xlabel "Date"
set ylabel "Number"
filename ='data.dat'
stats filename using 4 nooutput

set xdata time
set timefmt '%Y-%m-%d'
set format x '%Y'


rand_x(x) = x + 60*60*24*7 * (rand(0) - 0.5)
rand_y(y) = y + (rand(0) - 0.5)
set xrange [ "1995-01-19":"2013-12-12" ]
plot for [i=0:int(STATS_max)-1] filename \
using (rand_x(timecolumn(1))):(i < $4 ? rand_y($2) : 1/0):3 pointtype 7 linecolor  palette notitle
u 0:1:2 with labels hypertext point pt 7 ps var lc rgb "#ffee99"
那么你能告诉我我的剧本有什么问题吗?
谢谢。

首先请读者注意:
超文本
仅适用于4.7开发版本

解决您的问题:为了打印标签,还必须使用相同的x和y列1和2(使用0和1)。第三列用于标签,第四列用于
ps-var
。因此,标签的打印部分是:

plot for [i=0:int(STATS_max)-1] filename \
using (rand_x(timecolumn(1))):(i < $4 ? rand_y($2) : 1/0):3 pointtype 7 linecolor  palette notitle,\
'' u 1:2:3:3 with labels hypertext point pt 7 ps var lc rgb "#ffee99"
[i=0:int(STATS\u max)-1]文件名的绘图\ 使用(rand_x(timecolumn(1)):(i<$4?rand_y($2):1/0):3点类型7线调色板notitle\ “”u 1:2:3:3,带标签超文本点pt 7 ps var lc rgb“#ffee99”
Thx Christoph,但我如何下载gnuplot 4.7?我在他们的网站上找不到下载链接!我以为你用的是开发版。或者你是如何知道超文本功能的?有关Windows,请参见,但最新版本是2013-08-01。对于Linux,你必须自己编译。在我试图找到鼠标悬停的解决方案后,我从谷歌知道了超文本功能。顺便说一句,我下载了4.7版本,但我没有工作。在哪里可以看到标签和列内容?我更新了答案以保留完整的plot命令,在标签部分之前还缺少逗号和反斜杠。超文本只适用于某些终端(wxt、qt、svg、canvas、win)。使用2013-08-01给我的版本,看到中间的标签,截图时鼠标指针被隐藏了。Thx@Christoph,它工作了!你总是在这个项目中帮助我:)
plot for [i=0:int(STATS_max)-1] filename \
using (rand_x(timecolumn(1))):(i < $4 ? rand_y($2) : 1/0):3 pointtype 7 linecolor  palette notitle,\
'' u 1:2:3:3 with labels hypertext point pt 7 ps var lc rgb "#ffee99"