How to plot a graph that has two x-axis?
조회 수: 4(최근 30일)
표시 이전 댓글
I want to plot Extreme Value Type I,II,III distribution curve. How can I plot a graph that has two x-axis? One x-axis(main) which is 'reduced variate' is linear and the other x-axis(sub) which is 'year' is non-linear. It looks like as below.
one x-axis(main): reduced variate
-------------------------------------------
-2 -1 0 1 2 3 4 5 6
the other x-axis(sub): year
-----------------------
2 5 10 20 50 100
댓글 수: 1
Priyank Sharma
2016년 5월 16일
I am also in search of the solution. If you find one, kindly share with me... My mail id is pjs230688@gmail.com
답변(3개)
Scott
2012년 12월 31일
You have to be a little creative. I would start with the explanation at http://www.mathworks.com/help/matlab/creating_plots/using-multiple-x-and-y-axes.html. This isn't quite your case, but it explains how to do the overlays. You would plot the function twice on the two different axes. Then on the second one, you would need to use the 'XTick' and 'XTickLabel' properties to display the second axis as you described.
댓글 수: 0
Malcolm Lidierth
2012년 12월 31일
With Waterloo graphics, you can have any number of layered graphs each with independent axes (linear, log etc):

For MATLAB examples see:
For the project website see:
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!