3

(只是记录 - 自我回答跟随)

gnuplot中,我可以有两个图(比如,sin(x)cos(x)这样:

gnuplot> plot sin(x), cos(x)

它提供了这样的图表:

gnuplot 窗口

我想以交互方式单击某些东西,然后(比如说)隐藏sin(x)- 然后再次用鼠标单击某处以显示它。

我已经看到(在http://gnuplot.sourceforge.net/demo_canvas_4.6/中)可以使用 HTML5canvas终端执行此操作 - 在我的 Firefox 中,我可以单击1演示中圈出的小圆圈,以显示/隐藏那里的一个地块。不幸的是,该canvas终端似乎仅适用于gnuplot4.6 - 而我使用的是 4.4。

早期版本的交互式终端是否有类似的功能gnuplot

4

1 回答 1

3

Indeed, it turns out there is - I just couldn't find anything in the documentation.

First you need to click on the wrench icon ("Open configuration dialog") on the wxt terminal window; in there, there is an option "Toggle plots on/off when key sample is clicked", which should be enabled.

If it is, then one can simply click on the function entry in the legend (that is, the key), and the visibility of that particular plot will be toggled there.

NB: The phrase "key sample" confused me, because if you plot data of, say, 2 points (say, (0,0) and (1,1)) with, say, linespoints, then you'd get "points" at (0,0) and (1,1), and a line that connects them; usually I would have considered the "points" to be "key samples" (in analogy to "key frames"), whereas the line would represent "interpolated samples" - but that is not the meaning here; here clicking on "key sample" means clicking on the entry in the legend!

Hope this helps someone,
Cheers!

于 2013-07-11T15:27:41.973 回答