Code covered by the BSD License  

Highlights from
DRAGZOOM - Drag and zoom tool

image thumbnail

DRAGZOOM - Drag and zoom tool

by

 

04 Nov 2010 (Updated )

DRAGZOOM allows you to handy interactively manage the axes in figure.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

test_subplot_2D
function test_subplot_2D
%TEST_SUBPLOT_2D Test subplot 2D with DRAGZOOM

figure('Units', 'pixels');
x = -pi*2:0.1:pi*2;
y1 = sin(x);
y2 = cos(x);
y3 = sin(x).^3 - cos(x).^2;

hax1 = subplot(3, 1, 1); 
plot(hax1, x, y1, '.-r')

hax2 = subplot(3, 1, 2); 
plot(hax2, x, y2, 'o-b')

hax3 = subplot(3, 1, 3); 
plot(hax3, x, y3, '*-g')
legend('test')

% dragzoom([hax1; hax3]); % manage only axes 1 and axes 3
dragzoom()

Contact us