addScrollbar

Add a scrollbar to scroll the x- or y-axis on one or more axes in a figure.
387 Downloads
Aktualisiert 16. Okt 2012

Lizenz anzeigen

Add a scrollbar to control the x- or y-axis on one or more axes. Input 1: axis handle(s), input 2: size of window when scrolling (optional, default is data range in plot divided by 10), input 3: 'x' or 'y' to specify if scrollbar should control the x- or y-axis (optional, default is 'x').

%Example 1: Use a scrollbar to view slices of 100 points of a sine curve at the time
plot(1:1:10000,sin(1:1:10000))
addScrollbar( gca, 100 )
%To scroll the y-axis as well: addScrollbar( gca, 1, 'y' )
Example 2: Scroll/control multiple axes with one scrollbar:
figure;ax(1)=subplot(2,1,1);plot(1:1:10000,sin(1:1:10000));grid on;
ax(2)=subplot(2,1,2);plot(1:1:10000,sin([1:1:10000]+pi/2));grid on;
addScrollbar( ax, 10 )

Zitieren als

Ivar Eskerud Smith (2024). addScrollbar (https://www.mathworks.com/matlabcentral/fileexchange/38612-addscrollbar), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2012a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Annotations finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0