scrollzoompan¶
- scrollzoompan(ax, dir, zoom_fcn, pan_fcn, bounds)
SCROLLZOOMPAN Add pan and zoom scroll bars to an axis (mouse wheel = pan, shift+wheel = zoom)
- Usage:
- [zslider, pslider, zedit, pedit, zlabel, plabel, zlstnr, plstnr] = …
scrollzoompan(ax, dir, zoom_fcn, pan_fcn, bounds)
- Inputs:
ax : axes handle - axis to zoom and pan (default: gca) dir : char - ‘x’ or ‘y’ zoom/pan direction (default: ‘x’) zoom_fcn : function handle - called on zoom (default: []) pan_fcn : function handle - called on pan (default: []) bounds : 1x2 double - absolute min/max for the zoom/pan axis (default: axis limits)
- Outputs:
zslider : slider handle - zoom slider pslider : slider handle - pan slider zedit : edit handle - zoom edit box pedit : edit handle - pan edit box zlabel : text handle - zoom label plabel : text handle - pan label zlstnr : listener - zoom slider listener plstnr : listener - pan slider listener
Example
figure; plot(randn(1,1000)); scrollzoompan; figure; imagesc(peaks(1000)); scrollzoompan(gca, ‘y’);
See also: zoom, pan, linkaxes
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿