Code covered by the BSD License  

Highlights from
Link All Axes in Figure

2.0

2.0 | 1 rating Rate this file 15 Downloads (last 30 days) File Size: 1.34 KB File ID: #34476

Link All Axes in Figure

by

 

This is just a simple utility function to find all subplots in a figure and link their axes.

| Watch this File

File Information
Description

Syntax is the same as linkaxes, except without passing in the handles to the axes to link. It replaces:
       figure;
       ax(1) = subplot(2,1,1);
       plot(rand(10,1));
       ax(2) = subplot(2,1,2);
       plot(1:10);
       linkaxes(ax,'x')
       clear ax

with:
       figure;
       subplot(2,1,1);
       plot(rand(10,1));
       subplot(2,1,2);
       plot(1:10);
       linkaxesInFigure('x')

Required Products MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
11 Sep 2014 pietro  

Contact us