在gnuplot x11中的鼠标

10

我注意到在使用gnuplot中的X11终端时,可以使用鼠标右键放大图表。

但我找不到其他鼠标手势的文档。例如,缩小图像就好了!您能否建议一下呢?

最好的解决方案,是使用鼠标右键缩放来放大,然后使用“p”键返回,正如Christoph所建议的那样。


编辑: 显然,唯一的可能性是使用鼠标右键放大并使用键盘上的“p”键回退,正如Christoph所建议的那样。

2个回答

12

是的,关于这个问题文档并不是很清楚。您可以在 help mouse(在交互式 gnuplot 终端中输入此命令,或查看 pdf 中的 Mouse 部分)下找到一些信息。例如,它会展示如何使用鼠标滚轮进行 x 和 y 方向的滚动和缩放(help mouse scrolling)。

要获取所有手势,请输入 show bind,这将给出我(Linux,4.6.4):

gnuplot> show bind

 2x<B1>             print coordinates to clipboard using `clipboardformat`
                    (see keys '3', '4')
 <B2>               annotate the graph using `mouseformat` (see keys '1', '2')
                    or draw labels if `set mouse labels is on`
 <Ctrl-B2>          remove label close to pointer if `set mouse labels` is on
 <B3>               mark zoom region (only for 2d-plots and maps).
 <B1-Motion>        change view (rotation). Use <ctrl> to rotate the axes only.
 <B2-Motion>        change view (scaling). Use <ctrl> to scale the axes only.
 <Shift-B2-Motion>  vertical motion -- change xyplane
 <wheel-up>         scroll up (in +Y direction).
 <wheel-down>       scroll down.
 <shift-wheel-up>   scroll left (in -X direction).
 <shift-wheel-down>  scroll right.
 <control-wheel-up>  zoom in toward the center of the plot.
 <control-wheel-down>   zoom out.
 <shift-control-wheel-up>  zoom in only the X axis.
 <shift-control-wheel-down>  zoom out only the X axis.

Space          raise gnuplot console window
 q            * close this plot window

 a              `builtin-autoscale` (set autoscale keepfix; replot)
 b              `builtin-toggle-border`
 e              `builtin-replot`
 g              `builtin-toggle-grid`
 h              `builtin-help`
 l              `builtin-toggle-log` y logscale for plots, z and cb for splots
 L              `builtin-nearest-log` toggle logscale of axis nearest cursor
 m              `builtin-toggle-mouse`
 r              `builtin-toggle-ruler`
 1              `builtin-previous-mouse-format`
 2              `builtin-next-mouse-format`
 3              `builtin-decrement-clipboardmode`
 4              `builtin-increment-clipboardmode`
 5              `builtin-toggle-polardistance`
 6              `builtin-toggle-verbose`
 7              `builtin-toggle-ratio`
 n              `builtin-zoom-next` go to next zoom in the zoom stack
 p              `builtin-zoom-previous` go to previous zoom in the zoom stack
 u              `builtin-unzoom`
 Right          `builtin-rotate-right` only for splots; <shift> increases amount
 Up             `builtin-rotate-up` only for splots; <shift> increases amount
 Left           `builtin-rotate-left` only for splots; <shift> increases amount
 Down           `builtin-rotate-down` only for splots; <shift> increases amount
 Escape         `builtin-cancel-zoom` cancel zoom region

这个帮助会很有用!不幸的是,“show bind”在我的gnuplot中无效。我只能使用右键缩放!Gnuplot版本是“4.2 patchlevel 6”,终端x11。 - altroware
似乎这是在4.4.3版本中引入的,根据其NEWS文件:新增通过鼠标滚轮实现平移和缩放功能。 - Christoph
但我仍然可以使用右键放大。没有缩小的方法吗? - altroware
1
您可以使用例如 p 的方式取消缩放,该方式将返回到先前的缩放设置。 - Christoph
有没有办法通过鼠标跟随曲线?让鼠标光标自动吸附到最近的曲线上,并且能够看到确切的X,Y坐标而不仅仅是一个近似值,这将非常方便在接近曲线时进行操作。 - Eric Duminil

-1

我知道这是一个旧帖子,但我一直遇到图形在gnuplot窗口(版本4.6补丁级别6)中太大的问题。

我找到的解决方案是按住滚轮并向左或向右平移以缩小或放大。

希望能有所帮助。


那么你肯定在做其他错误的事情。不适合作为这个问题的答案。 - Christoph

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接