Plot a variable against multiple independent variables.

22 vues (au cours des 30 derniers jours)
Sean Waugh
Sean Waugh le 12 Avr 2016
Réponse apportée : Jon le 13 Avr 2016
I have a data set that has parameters which vary according to different variables, and i would like to plot it against those variables on a single graph. To make it easy, lets say I'm looking at the number of raindrops in a 500 m deep box as I move vertically through the atmosphere.
Now I could plot those counts against pressure, temperature, altitude, etc. (they all change going up). What I would like to do is create a single plot with multiple y axes (one each for temperature, pressure, and altitude) so that you could reference those drop counts against different y values simultaneously.
Problem is, I can't figure out how to get the axes to scale the same. Is there a way to have matlab create a second, or third, or whatever axis using a different y variable?

Réponses (1)

Jon
Jon le 13 Avr 2016
Also search plotyy on the file exchange.
If you only need one plot and more than two axes, I find it's faster just to make each plot individually then add the axes manually in Illustrator.

Catégories

En savoir plus sur Two y-axis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by