Code covered by the BSD License  

Highlights from
Break X Axis

5.0

5.0 | 4 ratings Rate this file 92 Downloads (last 30 days) File Size: 22.1 KB File ID: #42905
image thumbnail

Break X Axis

by

 

01 Aug 2013 (Updated )

Splits the x-axis into 2 disjoint regions in order to hide an uninteresting portion of a figure.

| Watch this File

File Information
Description

Features
1.) Minimal fuss, just works
2.) Professional looking graphs
3.) Works with all 2D graphics objects: Lines, Text, Patches, Images, etc.
5.) Obeys ‘XTickMode’ for automatic or manual positioning of tick marks.
6.) Obeys ‘Layer’ property
7.) Works with semilogy plots and with either axis reversed
8.) Can resize after splitting axis
8.) Possible to unsplit axis

Limitations
1.) No support for semilogx or loglog plots
2.) Creates extra copies of the data which may be problematic when displaying very large data sets.
3.) Text inside an axes must have 'Clipping' turned 'Off' or be added after splitting the axis. Otherwise it may be rendered twice. See TextExample.m for more details.

Acknowledgements

Break Axis, Break X Axis, and Break Plot inspired this file.

This file inspired Break Y Axis.

Required Products MATLAB
MATLAB release MATLAB 8.1 (R2013a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
11 Sep 2014 Wenzhen

Thanks! It's a nice and convenient function. However, there is a little bug about making the XTickLabel. In the main function, you've rearranged the XTick array, but not the XTickLabel array. As far as adding a similar line to the XTick array part, the problem would be fixed.

27 Feb 2014 Arturo Moncada-Torres  
26 Feb 2014 Mar

Thanks it's very useful, great!!
I have one question. When i make two breaks in the same plot the axes left and right don't keep the x scale. Do you know if is it possible to keep it?
Thank you very much.

04 Feb 2014 Peter T. S. DeVore

Would be nice if it could support multiple breaks. I, in particular, need that.

26 Sep 2013 Mark

Pretty awesome extension, easy to use.

Updates
05 Aug 2013

Fixed a bug that caused plots to be misaligned in some complex figures.

06 Aug 2013

Added a screen shot

Contact us