How to plot more than two graphs in one figure?

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.

 Respuesta aceptada

Arnaud Miege
Arnaud Miege el 26 de Abr. de 2011

0 votos

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 comentarios

Harapan Rachman
Harapan Rachman el 26 de Abr. de 2011
actually, if you ask the number, it would be in tenth (extreem case). file downloaded, haven't see the code. tx for the link. um, do you think, the code can be modified to acievhe my need?
Harapan Rachman
Harapan Rachman el 26 de Abr. de 2011
i mean, i'd like to make the axes number, flexible.
Arnaud Miege
Arnaud Miege el 26 de Abr. de 2011
I think so, if what you want is multiple axes on the same plot. If you want multiple plots on the same set of axes, then it's built-in functionality with the plot command.
Arnaud Miege
Arnaud Miege el 26 de Abr. de 2011
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 el 26 de Abr. de 2011
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.

Iniciar sesión para comentar.

Más respuestas (1)

Oleg Komarov
Oleg Komarov el 26 de Abr. de 2011

0 votos

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 comentarios

Harapan Rachman
Harapan Rachman el 26 de Abr. de 2011
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 el 26 de Abr. de 2011
um, on my second thought, the title maybe wrong. what i need is, more than two graph in one box/axes(?)

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by