如何在Gnuplot散点图中的mouseover/hover上的第三数据列中显示标签? [英] How to show a label from a third data column on mouseover / hover in a Gnuplot scatter plot?

查看:175
本文介绍了如何在Gnuplot散点图中的mouseover/hover上的第三数据列中显示标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个gnuplot数据文件:

I have a gnuplot data file:

Requested_width,Requested_depth,Requested_word,Name,N,M,Cycle_time,Clk2Q,Area,Total_Area
24,512,24,R1F512X24M8P24,1,1,1.9820,,7446.102,7446
24,512,24,R1F512X24M4P24,1,1,1.9937,,6757.0596,6757
....

我想散布第7列和第9列的图形(我可以做到!),然后当我将鼠标悬停在数据点上时我希望第4列的名称出现.我认为太混乱了,无法始终显示所有标签.

I want to scatter plot columns 7 and 9 (this I can do!), then I want the name in column 4 to appear when I mouse over a data point. I think it will be too cluttered to have all labels present at all times.

推荐答案

这在gnuplot4.7(当前的开发分支)中是完全可能的,但在以前的版本中是不可能的-从交互式提示中输入以下内容时效果很好:

This is completely possible in gnuplot4.7 (the current development branch), but not in previous versions -- The following works just fine when input from an interactive prompt:

set term wxt
set termoption enhanced
set datafile sep ','
plot 'test.dat' u 7:9:4 w labels hypertext point pt 7

如果将其放在脚本中,则需要以gnuplot -persist script.gp的形式调用gnuplot.

If you put it in a script, you need to invoke gnuplot as gnuplot -persist script.gp.

这篇关于如何在Gnuplot散点图中的mouseover/hover上的第三数据列中显示标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆