i have same data sets, but i really don't know how to make this kind of plot...

 채택된 답변

Joseph Cheng
Joseph Cheng 2014년 4월 10일

1 개 추천

Where we helped set them horizontally next to each other.

댓글 수: 4

Tomislav
Tomislav 2014년 4월 10일
but my data have different y axis scale
Joseph Cheng
Joseph Cheng 2014년 4월 10일
편집: Joseph Cheng 2014년 4월 10일
really? The link i gave showed the example of how to perform this horizontally. You can adapt what was found in the link for vertical subplots. instead of what we're doing in the x axis direction you would do for the y to stack them ontop of each other without spaces between subplots
x=[60:20:260]; %set x axis ticks
y=rand(11); %get something to plot
h1=subplot(2,1,2); %setup subplot1
plot(x,y,'-.'); %plot subplot1
box on % leave only x and y axes
xlim([60 260]) %setup some x axis
set(h1,'Xtick',x) %set the x axis ticks to show only x
h1_pos = get(h1,'Position'); %get the position data for sublot1.
y2 = 10*y.^2; %make something up for subplot2
h2=subplot(2,1,1); %make subplot2
plot(x,10*y,'-.'); %plot subplot2
box on
set(h2,'Xcolor',[1 1 1]) %make the Y axis line white
set(h2,'Xtick',[])
xlim([60 260]) %setup some x axis
h2_pos=get(h2,'Position');
set(h2,'Position',[h1_pos(1) h1_pos(2)+h1_pos(4) h2_pos(3:end)]) %using position of subplot1 put subplot2next to it.
3 min of adaptation of what i had in the link
Tomislav
Tomislav 2014년 4월 10일
tnx

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2014년 4월 10일

댓글:

2014년 4월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by