Plot a variable against multiple independent variables.

28 views (last 30 days)
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?

Answers (1)

Jon
Jon on 13 Apr 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.

Categories

Find more on Two y-axis in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!