Super scrollbar

Scroll through and zoom in/out of plot with arrow keys.
514 Downloads
Updated 10 Apr 2016

View License

See screenshot for quick description of components.
User can pan and zoom a plot (or other graphics object with YData/XData) using arrow keys, shift and command.
Works by adjusting the Y/X limits of the axes (reference axes) that is parent to the plot (or other object). User can also adjust scroll/pan speed by clicking on the scrollbar.
Unlike MATLAB slider scale, the scrollbar can be re-colored (larger range of color choices), resized. Orientation of scrollbar changes automatically when reference axes or figure position changes. Scrollbar limits can also be linked to plot handle X/Y data limits.
When commands outside of superscroll change references axes limits (e.g. you linked the reference axes to another axes). The scrollbar will adjust to reflect the portion of plotted data that is currently visible in the reference axes.
Super scrollbar should work in stand alone applications.
The function scrollableplot.m can be used instead of plot to quickly create a plot with scrollbars.
Run function example_scroll to see how superscroll works

KEY PRESS INFORMATION (used to manipulate the scrollbar)
|| Key || Description
||(+modifier) ||
-------------------------------------------------------------
PANING-------------------------------------------------------------
|| > || pan right (moves both left and right sides of patch)
|| < || pan left
|| ^ || pan up (moves both top and bottom sides of patch)
|| v || pan down
ZOOMING (horizontally)---------------------------------------------
|| > shift || zoom in horizontally (moves only left side of patch right)
|| < shift || zoom out horizontally (moves only left side left)
|| > command || zoom out horizontally (moves right side right)
|| < command || zoom in horizontally (moves right side left)
ZOOMING (vertically)-----------------------------------------------
|| v shift || zoom in vertically (moves only top side of patch down)
|| ^ shift || zoom out vertically (moves top side of patch up)
|| v command || zoom out vertically (move bottom side of patch down)
|| ^ command || zoom in vertically (moves bottom side up)

Cite As

E Zakreski (2024). Super scrollbar (https://www.mathworks.com/matlabcentral/fileexchange/56404-super-scrollbar), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0

updated description
updated description.

added screen shot