Same as FIGURE, but zooming/panning is done more conveniently with scroll wheel/clicks.
Vous suivez désormais cette soumission
- Les mises à jour seront visibles dans votre flux de contenu suivi
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails
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)
Citation pour cette source
Rody Oldenhuis (2026). Mouse-friendly FIGURE (https://github.com/rodyo/FEX-mouse_figure/releases/tag/v1.3), GitHub. Extrait(e) le .
Remerciements
A inspiré : Ginput with snap to grid, akZoom
Informations générales
- Version 1.3 (4,37 ko)
-
Afficher la licence sur GitHub
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
Les versions qui utilisent la branche GitHub par défaut ne peuvent pas être téléchargées
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 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]
|
||
| 1.1.0.0 | Updated contact info |
||
| 1.0.0.0 |
