Skip to main content
4 of 7
rewrote poorly worded question to shift focus to use of color function in ParametricPlot
Gary
  • 569
  • 3
  • 13

How to assign different colors to list plotted in ParametricPlot?

I am plotting galaxies and I would like to color them according to their redshift values using a temperature map as a metaphor for shifted wavelengths. Here, I will assume that a circle has a redshift value corresponding to its radius. How would one assign a different color to each circle using a temperature map with hue from blue to red corresponding to increasing size?

circle[Theta_, r_] := {r*Cos[Theta], r*Sin[Theta]};
ParametricPlot[Table[circle[Theta, r], {r, 1, 5}], {Theta, 0, 2 Pi}]

Apologies to acl and J.M. for loose wording of original, which appeared as follows:

"How would one assign a different color, say with ColorData["TemperatureMap"], to each circle? I know there is a function Circle, but I'm trying to use a simple example with ParametricPlot."

Gary
  • 569
  • 3
  • 13