How to plot 2 outputs on same graph, challenge is both of them has different xlim and ylim's.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
raghavendra kandukuri
el 11 de Nov. de 2018
Comentada: raghavendra kandukuri
el 12 de Nov. de 2018
Please open the attached PDF, i have attached the plots and code in there.
5 comentarios
Adam
el 12 de Nov. de 2018
Editada: Adam
el 12 de Nov. de 2018
Yes, I understood that your data has different x and y limits. That is why I asked the question. It clearly makes no sense to combine them without additional knowledge that isn't included here. If they have some sense in which they can be overlaid onto each other to make sense as you seem to suggest (though the data in your recently attached plot looks very different from the first) then you can always scale them mathematically to be in the same range before you plot them.
Your attached graph.png implies there is some clear mapping from one to the other so since you know what that mapping is just apply it. Otherwise you would just be arbitrarily positioning one on top of the other based on some contrived limits anyway - e.g. the 2nd plot has values upto ~2700 but the range by default is up to 3000. Where do you expect your -0.2 to 1.2 range to map to this to plot them together. Should 1.2 be mapped onto 2700 or onto 3000 or somewhere else?
Respuestas (1)
madhan ravi
el 11 de Nov. de 2018
yyaxis left
plot(...)
xlim...
ylim...
yyaxis right
plot (...)
xlim...
ylim...
4 comentarios
Ver también
Categorías
Más información sobre Bar Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!