Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Topic: Color coding a variable as a function of two others
Replies: 0

 Jana Houser Posts: 7 Registered: 11/24/09
Color coding a variable as a function of two others
Posted: Sep 21, 2012 3:08 PM

Hello,

I am trying to create a plot that illustrates velocity as a function of both time and height. I would like time on the x axis, height on the y axis, and some way of plotting the magnitude of velocity for each time/height location. So, I have a vector of velocity data with a corresponding time and height (e.g. at 0200 am the velocity is 35 m/s at a height of 1 km, at 0205 am, the velocity is 42 m/s at a height of 1.2 km etc.)

I thought about doing this one of two ways: First, creating a scatter plot of time vs height and color coding the plot points according to the value of velocity. The other way would be to create a filled plot where the color of the filled area represents a velocity range (say, plot blue for 35<v<30, green for 30<v<25, etc).

I have not had luck with the 'scatter' function from the standpoint of not knowing how to color code the dots according to the velocity values. Any help would be much appreciated!

Thanks!