How to plot 16 curves that are same y axis and different x axis on the same figure?

조회 수: 1 (최근 30일)
Hi everybody,
As the title, has anybody experienced this matter? The 16 curves have different x axes. I've tried with the bottom, top, left and right sides of the axes but it seemed to work with 2 plots. Could someone give me some advice to make the the figure with 16 x axes at the bottom of the figure?
Any help would be greatly appreciated.
Thank you.
  댓글 수: 2
Shoaibur Rahman
Shoaibur Rahman 2014년 12월 26일
I don't know what are you asking for. Is it something like:
plot(x1,y1, x2,y2,...x16,y16)
?
Khanh
Khanh 2014년 12월 26일
Excuse for my English.
The picture below shows the figure with a x axis and multiple y axes. How could I make a figure with a y axis and multiple x axes.

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

채택된 답변

dpb
dpb 2014년 12월 26일
편집: dpb 2014년 12월 29일
Nothing special, just mung on the axes position to shrink the height instead of width and instead of hiding the horizontal dimension of the additional axes, do so for on the vertical...
Basic idea is
hAx1=axes; % make first/main one
p1=get(hAx1,'position'); % get the position array
p1(4)=p1(4)*0.75;
set(hAx1,'position',p1) % shrink the height by 25%
p2=p1; p2(2)=p2(2)+p2(4)+0.05; % new bottom based on size of first
p2(4)=eps; % new height is miniscule so doesn't show
hAx2=axes('position',p2,'color','none'); % second x-axis only shows
xlim(hAx2,[0 5]) % sample different scaling
More are just repetitions of the above basic idea...
NB: this way you plot into hAx1 but have to scale the x values from those of the alternate axes to the x-axis limits of it, not those of the alternative axes; they're just for show.
It would be nice if TMW would have a single axis object instead of only the axes combined object but they don't.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Formatting and Annotation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by