0
votes

How could one break the x axis in the same figure (not the subplot function)?

You can see an example in line graph in panel b in the following picture, one single row data have been split into three parts as well as the x axis. the question is how this plot can be achieved in matlab.

enter image description here

(like the panel b in this figure)

2
It is very unclear what you are after. What "red arrow"? Are you just asking how to make gaps appear in the axis as in figure e in your image? - Dan
yes, something like that(I haven't noticed that i have changed the posted picture...) - XIN
@rayryeng That gif should be part of SO comments by default. - Ander Biguri
Xin, plese, reformulate your question. It looks that you have an interesting problem here, but it is very difficult to understand what you want right now. - Ander Biguri
@AnderBiguri - lol thanks. Someone didn't agree and removed it from the comments... but here it is for your benefit: img.pandawhale.com/… - rayryeng

2 Answers

1
votes

Ill leave you an exmaple here using surf.

The trick is inserting nans wherever you want the lines to appear "empty"

z=peaks(100);

% If you want to delete a certain amount of rows/cols
z2=z;
z2(:,10:15)=NaN;
z2(:,50:55)=NaN;
z2(:,75:80)=NaN;

% If you want to separate you data without deleting anything

z3=z;

z3=[z3(:,1:15) nan(size(z3,1),5) z3(:,16:75) nan(size(z3,1),5) z3(:,75:100) ];


% This last bit is only for plotting, so you can try it in your computer 
subplot(131)
title('Original')
surf(z,'edgecolor','interp')
axis off
view(2)
axis equal
subplot(132)
title('Deleted columns')
surf(z2,'edgecolor','interp')
axis off
view(2)
axis equal
subplot(133)
title('Separatedd data')
surf(z3,'edgecolor','interp')
axis off
view(2)

axis equal

enter image description here

0
votes

There are a couple of utilities on the File Exchange that allow you to do that: