Produces a plot who's y-axis skips to avoid unecessary blank space
if break_type='RPatch' the plot will look torn
in the broken space
if break_type='Patch' the plot will have a more
regular, zig-zag tear
if break_plot='Line' the plot will merely have
some hash marks on the y-axis to denote the
IT'S NOT FANCY, BUT IT WORKS.
Michael Robbins (2020). BreakAxis (https://www.mathworks.com/matlabcentral/fileexchange/3668-breakaxis), MATLAB Central File Exchange. Retrieved .
It gives an error in the function if I set the y-axis limit more than 50.
"Error using plot
Vectors must be the same length.
Error in BreakPlot (line 64)
Does anyone know how to fix it?
how one can break the Yaxis into more than two pieces
Is it possible to use this for hist function?
One small addition: If your y data has a large range and you want to skip a lot (e.g. several orders of magnitude), then the mid point might not be suitable for breaking. In my case the upper part got way too much range compared to the lower. Can easily be adjusted by tweaking the 'y_break_mid'. I used e.g.
y_break_mid= y_break_end - (y_break_end-y_break_start)./10;
Great code, helped a lot, Michael!
Thank you very much!
Well done, but It does not work when y is in a negative scale, i.e. y \in [-1000,0]
Excellent! very helpful function!
very efficient, and useful. Nice work
Nice, useful function! Would be nice to have the same for breakxaxis. (With the same patch options.)