Be the first to rate this file! 144 downloads (last 30 days) File Size: 3.93 KB File ID: #21864

BreakPlot

by Michael Robbins

 

22 Oct 2008 (Updated 12 Nov 2008)

No BSD License  

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

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

Download Now | Watch this File

File Information
Description

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

Replaces BREAKAXIS

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
BreakAxis

MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
11 Nov 2008 Jiro Doke

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'));

Please login to add a comment or rating.
Updates
12 Nov 2008

I instituted Jiro Doke's kind bug fix.

Tag Activity for this File
Tag Applied By Date/Time
axis Michael Robbins 23 Oct 2008 16:01:21
break Michael Robbins 23 Oct 2008 16:01:21
graph Michael Robbins 23 Oct 2008 16:01:21
graph types Michael Robbins 23 Oct 2008 16:01:21
plot Michael Robbins 23 Oct 2008 16:01:21
plotting Michael Robbins 23 Oct 2008 16:01:21
specialized Michael Robbins 23 Oct 2008 16:01:21
axis Cristina McIntire 13 Nov 2008 14:20:50
graph Cristina McIntire 13 Nov 2008 14:20:50
plot Cristina McIntire 13 Nov 2008 14:20:50
specialized Cristina McIntire 13 Nov 2008 14:20:50
potw Cristina McIntire 10 Dec 2008 16:05:41
potw Shari Freedman 20 Apr 2009 13:50:19
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com