Code covered by the BSD License  

Highlights from
fix_x_limits

Be the first to rate this file! 0 Downloads (last 30 days) File Size: 1.32 KB File ID: #24378

fix_x_limits

by Pekka Kumpulainen

 

09 Jun 2009

Forces the same XLim to all axis

| Watch this File

File Information
Description

fix_x_limits fixes all axis in current figure to the maximum span found
fix_x_limits(h) fixes XLim property of all axis objects in h or all axes parented under h if figure handles to maximum span found within all axes
fix_x_limits(h,limits) fixes all to given limits: [minx maxx]

Example:
h1 = subplot(2,1,1);hist(rand(100,1));
h2 = subplot(2,1,2);hist(randn(100,1));
fix_x_limits % set the maximum limits to all axes in current figure
fix_x_limits([h1 h2],[-3 3]) % Give the limits to the axis objects
fix_x_limits(gcf,[-5 4]) % Give the limits to the figure object

MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
graphics Pekka Kumpulainen 09 Jun 2009 09:52:42
xlim Pekka Kumpulainen 09 Jun 2009 09:52:42
axis limits Pekka Kumpulainen 09 Jun 2009 09:52:42

Contact us at files@mathworks.com