The Math Forum

Search All of the Math Forum:

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

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: plot points with dynamic colour
Replies: 1   Last Post: Mar 23, 2012 9:12 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 30
Registered: 4/14/09
plot points with dynamic colour
Posted: Mar 23, 2012 6:51 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi all,

I'm trying to plot a large amount of data with colour of the point representing some of the data.

I have some position data and speed data. I want to plot the lat and longs of the data and colour the points based on their value.

something like this...
DATA is a structure and ValidTimes a logical array.

R = 160./abs([DATA(ValidTimes).Speed]); %160 is max speed in the data set
G = R.*0;
B = R.*0;

plot([DATA(ValidTimes).PlotLongitude],[DATA(ValidTimes).PlotLatitude],'Color',[R G B],'Marker','.','LineStyle','none')

'Color' can only be a 3 element numeric vector, I could loop through all the ValidTimes but there are thousands of points and it takes a while, any ideas?


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.