Code covered by the BSD License  

Highlights from
addScrollbar

Be the first to rate this file! 8 Downloads (last 30 days) File Size: 1.98 KB File ID: #38612

addScrollbar

by

 

Add a scrollbar to scroll the x- or y-axis on one or more axes in a figure.

| Watch this File

File Information
Description

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 )

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us