gnuplot lines with hypertext points?

谁说我不能喝 提交于 2019-12-13 16:12:22

问题


I'm trying to get a linespoints plot with the points being hypertext. So far, I've managed to get linespoints working but without hypertext and I've split it into two plots overlaid, one with lines one with hypertext points. While the second "works", it results in an extra key for the points. Ideally, I want linespoints key entries for each line and points combination, not a line key and a points key.


回答1:


That may be possible with a bit cheating. Usually the hypertext is shown only if also points is set. Since the area which is active for the hypertext depends on the point size, you can draw all points with linespoints and then use a transparent point when plotting the labels:

set samples 11
set xrange [0:10]
plot '+' using 1:1:1 with linespoints pt 7 ps var title 'mytitle',\
     '+' using 1:1:(sprintf('(%d,%d)', $1, $1)):1 with labels hypertext point pt 7 lc rgb '#ff000000' notitle

Note for other users: The hypertext option was introduced in version 5.0.



来源:https://stackoverflow.com/questions/26241798/gnuplot-lines-with-hypertext-points

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!