Mouse-friendly FIGURE

バージョン 1.3 (4.37 KB) 作成者: Rody Oldenhuis
Same as FIGURE, but zooming/panning is done more conveniently with scroll wheel/clicks.

ダウンロード: 2.5K

更新 2020/5/2

GitHub から

GitHub でライセンスを表示

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.

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


Rody Oldenhuis (2023). Mouse-friendly FIGURE (, GitHub. 取得済み .

MATLAB リリースの互換性
作成: R2009a
Windows macOS Linux

ヒントを与えたファイル: 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 の既定のブランチを使用するバージョンはダウンロードできません

バージョン 公開済み リリース ノート

See release notes for this release on GitHub:

[linked to Github]
- updated PayPal link

Updated contact info

この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。
この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。