BreakAxis

版本 1.0.0.0 (1.1 KB) 作者: Michael Robbins
Produces a plot who's y-axis skips to avoid unecessary blank space.
14.6K 次下载
更新时间 2003/7/1

无许可证

BreakPlot(x,y,y_break_start,y_break_end,break_type)
Produces a plot who's y-axis skips to avoid unecessary blank space

INPUT
x
y
y_break_start
y_break_end
break_type
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
break

USAGE:
figure;
BreakPlot(rand(1,21),[1:10,40:50],10,40,'Line');
figure;
BreakPlot(rand(1,21),[1:10,40:50],10,40,'Patch');
figure;
BreakPlot(rand(1,21),[1:10,40:50],10,40,'RPatch');
figure;
x=rand(1,21);y=[1:10,40:50];
subplot(2,1,1);plot(x(y>=40),y(y>=40),'.');
set(gca,'XTickLabel',[]);
subplot(2,1,2);plot(x(y<=20),y(y<=20),'.');%

IT'S NOT FANCY, BUT IT WORKS.

引用格式

Michael Robbins (2024). BreakAxis (https://www.mathworks.com/matlabcentral/fileexchange/3668-breakaxis), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R13
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0