Code covered by the BSD License  

Highlights from
BreakXAxis

4.4

4.4 | 6 ratings Rate this file 77 Downloads (last 30 days) File Size: 1.64 KB File ID: #3683
image thumbnail

BreakXAxis

by

 

03 Jul 2003 (Updated )

Inserts < // > into a 'broken' or discontinuous x-axis.

| Watch this File

File Information
Description

h=BreakXAxis(x,y,start,stop,width) plots (x,y) and breaks the plot's x-axis between <start> and <stop>, by inserting a broken-axis symbol < // > into a space <width> wide. This type of plot is often used in scientific papers, when the data between <start> and <stop> isn't interesting. The code can be easily modified (swap y for x) to break the y-axis.

Acknowledgements

Break Axis inspired this file.

This file inspired Break X Axis.

MATLAB release MATLAB 6.5 (R13)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
23 Jul 2014 Pascale Lelong

Great program. Does exactly what I needed!

17 Aug 2011 Aurélien BERTIN

I don't understand how you can do the same on y-axis. Can you explain? What do I have to change in code? Thanks

23 Apr 2011 Richard Rieber

Great function. I was trying to do this for a bar chart, so it doesn't apply. Seems like it would be simple to adapt. However, I did notice that the function uses max(ytick) to calculate where to put the '//' on the upper x-axis. This may not work in cases where the maximum ytick is not on the upper y-axis. Perhaps use:

> v = axis;
> t2 = text(start+width/2,v(4),'//','fontsize',15);

10 Jun 2010 Ashok Reddy

Nice work. Any later version of Matlab has such a functionality built-in?

09 Feb 2010 alex marin

Nice, but the break mark on the x axis does not have a "professional" look as in e/g/ origin.

30 Jun 2009 Joseph  
30 Jun 2009 Joseph

Wow! Great work.

NOTE TO USERS:
i) it is usually desirable to have width as small as feasible

ii)it's really easy to add your own style text parameter to the function so that you can do more than the default blue dot.

REALLY GREAT !!! A manager at our company really loved it -- need I say more!

17 Jun 2009 Ale Guillén-Mandujano  

Contact us