开发者

Clickable Or Tool Tip in Plots

I 开发者_开发问答have a couple of 2D plots which I am plotting using Gnuplot.

In Gnuplot, is it possible to associate clickable labels to data points? Or tool tip which will be displayed on mouse over? I am aware of permanent labels ("with labels") for data points. But I need to able to hide these labels.

If not Gnuplot, is there some other tool that has this functionality?


Yes it is possible to set a "tool tip" with gnuplot. Therefore gnuplot has to be compiled with using mouse events. (Per default this is the case, you'd have to explicitly set a flag to not include mouse events).

The other issue you have to take into account, is that only certain terminals are capable of handling mouse events (pm, x11, ggi, windows and wxt).

Third and hopefully last only certain views can handle mouse events (2d graphs and maps).

(i.e. splots with set view having z-rotation 0, 90, 180, 270 or 360 degrees, including set view map)

If all this is the case, mouse events can be set and configured like set mouse linke described HERE.

The script below should place labels at positions where you press the middle mouse button:

plot sin(x)
pause -1

If you want to hide labels or see the coordinates of the current mouse position, simply press 'h' while the gnuplot window has the keyboard focus and a list of commands will be displayed, showing you all options currently available through keyboard and mouse bindings. But even those are configurable with the bind command which is described HERE.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜