Mathematica 9 is now available
Student Support Forum
Student Support Forum > General > > "Defining a different color for each point"

Post Reply:
Email Address:

Please send email when my message is replied to.

Url (optional):
Message: view original message?
Attachment (optional):
Please answer this:1+3 =

Original Message (ID '133220') By Michael:
In Response To 'Re: Re: Re: Defining a different color for each...' --------- Building on Bill Simpson's example, if you have a lot of points (like a thousand), then using the VertexColors option of Point will have quite a bit faster rendering time: polarData = Table[{j, j, j Cos[j] Sin[j]/(50 \[Pi])}, {j, 0, 100 Pi, 1/10}]; polarPoint[{radius_, angle_, z_}] := {radius*Cos[angle], radius*Sin[angle]}; myColorFn[{radius_, angle_, z_}] := Hue[z]; Graphics[{PointSize[.05], Point[polarPoint /@ polarData, VertexColors -> (myColorFn /@ polarData)]}, Axes -> True] For a different sort of visualization, you can also use ListContourPlot[polarToRectangular /@ polarData] where polarToRectangular is Bill Simpson's polarToRectangular[{radius_, angle_, color_}] := {radius*Cos[angle], radius*Sin[angle], color};