Mouse-friendly FIGURE

版本 1.3 (4.4 KB) 作者: Rody Oldenhuis
Same as FIGURE, but zooming/panning is done more conveniently with scroll wheel/clicks.
2.5K 次下载
更新时间 2020/5/2

MOUSE_FIGURE(handle) creates a figure (or modifies an existing one with handle [handle]) that allows zooming with the scroll wheel and panning with mouse clicks, *without* first selecting the ZOOM or PAN tools from the toolbar. Moreover, zooming occurs to and from the point the mouse currently hovers over, instead of to and from the less intuitive "CameraPosition" as is the case with the default ZOOM. Naturally, the classical ZOOM and PAN toolbar icons are left unaltered.
Mouse button functionality:
Scroll: zoom in/out
Left click: pan
Double click: reset view to default view
Right click: set new default view
LIMITATIONS: This function (re-)efines several functions in the figure (WindowScrollWheelFcn, WindowButtonDownFcn, WindowButtonUpFcn and WindowButtonMotionFcn), so if you have any of these functions already defined they will get overwritten. Also, MOUSE_FIGURE() only works properly for 2-D plots. As such, it should only be used for simple, first-order plots intended for "quick-n-dirty" data exploration. Only tested on MATLAB 2009a, on WinXP platform.
EXAMPLE:

mouse_figure;
x = linspace(-1, 1, 10000);
y = sin(1./x);
plot(x, y)

引用格式

Rody Oldenhuis (2024). Mouse-friendly FIGURE (https://github.com/rodyo/FEX-mouse_figure/releases/tag/v1.3), GitHub. 检索来源 .

MATLAB 版本兼容性
创建方式 R2009a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Visual Exploration 的更多信息
致谢

启发作品: Ginput with snap to grid, akZoom

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.3

See release notes for this release on GitHub: https://github.com/rodyo/FEX-mouse_figure/releases/tag/v1.3

1.2.0.0

[linked to Github]
- updated PayPal link

1.1.0.0

Updated contact info

1.0.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库