How to plot more than two graphs in one figure?

조회 수: 3 (최근 30일)
Harapan Rachman
Harapan Rachman 2011년 4월 26일
as the title implies, how can i achieve that? i think this would be tricky. with requirement, that each graph has visually distinctive y-axis. tqvm.
PS: been searching for likely thread, but there is an answer for only two graph, with one y-axes on the left and the other on the right.

채택된 답변

Arnaud Miege
Arnaud Miege 2011년 4월 26일
How many axes do you need? Using ploty4, you can get 4. I guess you can modify the code if you need more axes.
HTH,
Arnaud
  댓글 수: 5
Arnaud Miege
Arnaud Miege 2011년 4월 26일
Possibly, but I suspect it would require a bit of programming. The other issue I can foresee is with that many axes, there's hardly going to be any room left for the actual plot.
Arnaud Miege
Arnaud Miege 2011년 4월 26일
Another suggestion: if some of your signals are of the same order of magnitude, you might want to plot them on the same (vertical) axis, it will reduce the number of axes required. You can then use a legend to distinguish which one is which.

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

추가 답변 (1개)

Oleg Komarov
Oleg Komarov 2011년 4월 26일
Use plotyy
Also give a look at the example code I posted in this thread: http://www.mathworks.com/matlabcentral/answers/5649-align-problem-in-multiple-axes
  댓글 수: 2
Harapan Rachman
Harapan Rachman 2011년 4월 26일
hi, tqvm.
AFAIK, your links discussed only 2 graphs in one axes. I need to plot more than that in one axes.
Harapan Rachman
Harapan Rachman 2011년 4월 26일
um, on my second thought, the title maybe wrong. what i need is, more than two graph in one box/axes(?)

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

카테고리

Help CenterFile Exchange에서 Two y-axis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by