* Allows to toggle zoom / pan / rotate / datacursor
* Adds "zoom with mousewheel" to "pan" mode
* Said functionality does not disappear when corresponding buttons are clicked on the figure toolbar
(in contrast with a naive approach)
* Provides an example of a workaround on how to fix 'KeyPressFcn' beeing overwritten when cursor mode changes
* 'z' - toogles zoom mode ( last used of zoom-in and zoom-out - assumes
that mouse wheel is used to change the zoom level )
* 'x' - toggles pan mode. Also adds zooming-with-mouse-wheel.
* 'c' - toggles rotation mode
* 'v' - toggles datacursor mode
Try the demo:
or try it on your own figure like this:
>> imshow('peppers.png'); figkeys.setHotkeys();
Igor (2022). i3v/figkeys (https://github.com/i3v/figkeys), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!