Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Defining a different color for each point' topicStudent Support Forum > General > Archives > "Defining a different color for each point"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
10/30/12 8:12pm

In Response To 'Re: Re: Defining a different color for each point'
---------
You wrote "I have a set of coordinates (x,y,z) that I want to plot..."

If you have polar data {radius,angle,color} data instead of {x,y,color} data then perhaps you can see how to use this

In[1]:= polarData = Table[{j, j, j/(2Pi)}, {j, 0, 2Pi, Pi/8}];
polarToRectangular[{radius_, angle_, color_}] := {radius*Cos[angle], radius*Sin[angle], color};
rectangularData = Map[polarToRectangular, polarData];
Show[PolarPlot[0, {angle, 0, Pi}], Graphics[{PointSize[.05], Map[{Hue[Last[#]], Point[Most[#]]} &, rectangularData]}], PlotRange -> All]

Out[4]= <polar plot snipped>

URL: ,

Subject (listing for 'Defining a different color for each point')
Author Date Posted
Defining a different color for each point Wes 10/29/12 10:53am
Re: Defining a different color for each point Bill Simpson 10/29/12 12:50pm
Re: Re: Defining a different color for each point Wes 10/30/12 2:30pm
Re: Re: Re: Defining a different color for each... Bill Simpson 10/30/12 8:12pm
Re: Re: Re: Re: Defining a different color for ... Michael 11/17/12 9:08pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic