File Exchange

image thumbnail

BreakPlot

version 1.1 (3.93 KB) by

Produces a plot who's y-axis skips to avoid unnecessary blank space

22 Downloads

Updated

No License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Produces a plot who's y-axis skips to avoid unecesary blank space

Replaces BREAKAXIS

Comments and Ratings (7)

Had an error in the previous code segmen. Here's the right one:

case 'Line',
% Edit by SS
LW = get(gca,'linewidth');
fill(x+dx/2*[-1 1 1 -1],y+dy*[-3 -2 -1 -2],get(gcf','color'),'EdgeColor',get(gcf','color'),'clipping','off')
line([x-dx/2 x+dx/2 ],[y-2.*dy y-dy ],'clipping','off','linewidth',LW);
line([x-dx/2 x+dx/2 ],[y-3.*dy y-2.*dy],'clipping','off','linewidth',LW);

Caroline Lau

DoubleRL

Good。Need Download

John Patrick

Thanks.

Ganquan Mao

Very nice

Works very well for my purpose. Most powerfull from my point of vue than breakxaxis for y-axis breaking

Jiro Doke

Jiro Doke (view profile)

Nice function, Michael. I can see this will be very useful.

I found some bugs, though. Try this example:

sampleTimes = [1:200];
RPM = [600+rand(1,100)*500, 9000+rand(1,100)*2500];
breakplot(sampleTimes, RPM, 1500, 8500, 'Line');

I get an error in line 142 with the RESHAPE function.

One question, I don't quite understand the reasoning behind how you get the yticklabel. Can't you simply do this?

set(gca, 'yticklabel', num2str(ytick'));

Updates

1.1

I instituted Jiro Doke's kind bug fix.

MATLAB Release
MATLAB 6.0 (R12)
Acknowledgements

Inspired by: BreakAxis

Inspired: Break X Axis, Break Y Axis

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video