ContentsBREAKPLOT makes short work of that task. Consider, for example, that you had some sampled engine-speed data collected during two times in the engine's cycle. The first 100 data points are colleced (at sampling times 1:100) while the engine is idling, and the second 100 data are collected (at t = 101:200) while the engine is being revved:
sampleTimes = 1:200; RPM = [600+rand(1,100)*500, 5500+rand(1,100)*2500];
Get the MATLAB code Published with MATLAB® 7.7
4 CommentsOldest to Newest
This Breakplot function is nice. BreakXAxis, also on the file exchange, breaks plots with “//” on the axis that’s broken. Which is more consistent with what I see in publications. I wish matlab would incorporate basic axis-breaking options into their plotting tools. That would make matlab data visualization even more powerful. Some graphing software packages, like Sigmaplot, have this built in and the option is user friendly.
I agree with chris. It would be really nice if Matlab included this in its default graphing package; downloading extra functions can be a pain, especially if you tend to work on multiple computers and it is such a “simple” and pervasive function as this.
Thanks, Chris and David. I’ve shared the suggestion with our Developers. Getting this kind of user feedback is very useful to us!
I am trying to use this code, but it is not plotting my data correctly, nor breaking the data correct.