How to create one plot with two x axes ?

조회 수: 3 (최근 30일)
Elad
Elad 2012년 6월 27일
How can I create a single plot with 2 x axis that correspond to the data? let say one axis up and one down. Thanks

답변 (1개)

Walter Roberson
Walter Roberson 2012년 6월 27일
See the File Exchange contribution "plotxx"
  댓글 수: 3
Walter Roberson
Walter Roberson 2012년 6월 28일
plot NaN, NaN in the second plot, and set() its XLim and Direction to be what you want to see.
If you have a requirement to use only one axes object instead of two, then you will have to line() and text() the additional axes into place, and you will need to add action post-filters for both zoom and pan so that you can redraw that information according to the new axis bounds. MATLAB does not offer any mechanism for arbitrary positioning of an object that acts like an axes: MATLAB only supports edge axes (identical on two sides if both sides are shown.)
Elad
Elad 2012년 6월 28일
Oh, ok. Thanks for the answer.

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

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by