1

I would like to use ParametricPlot twice and use Show to put them together:

p1 = ParametricPlot[ 
  Evaluate@
   Table[ReIm[r ( Cos[u] + I  Sin[u])], {r, Range[0.1, 0.9, .2]}],
  {u, -Pi/2, 3 Pi/2},
  PlotStyle -> Thick,
  PlotRange -> 1.2,
  AxesStyle -> Opacity[0.2],
  ImageSize -> 300]

p2 = ParametricPlot[ 
  Evaluate@
   Table[ReIm[
     r ( Cos[u] + I  Sin[u])], {u, {Pi/6, 3 Pi/4, 5 Pi/4, -Pi/4}}],
  {r, 0.01, 0.9999},
  PlotStyle -> {Thick},
  PlotRange -> 1.2,
  AxesStyle -> Opacity[0.1],
  ImageSize -> 300]

enter image description here enter image description here

One can see that the four colors in p2 are the same as the first four colors in p1. How can I make p2 with a set of colors different from that of p1?


One might manually choose different colors for lines in p2. I'm interested in a way that makes colors in p1 and p2 look as if they are from one ParametricPlot.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574

2 Answers2

4

Use PlotStyle and ColorData to specify the color of the lines.

p1

PlotStyle -> Table[ColorData[97, i], {i, 1, 5}]

p2

PlotStyle -> Table[ColorData[97, i], {i, 6, 9}]

All together:

Show[
 p1 = ParametricPlot[
   Evaluate@
    Table[ReIm[r (Cos[u] + I Sin[u])], {r, Range[0.1, 0.9, .2]}], {u, -Pi/2, 3 Pi/2}, 
   PlotStyle -> Table[Directive[Thick, ColorData[97, i]], {i, 1, 5}], 
   PlotRange -> 1.2, AxesStyle -> Opacity[0.2], ImageSize -> 300],
 p2 = ParametricPlot[
   Evaluate@
    Table[ReIm[r (Cos[u] + I Sin[u])], {u, {Pi/6, 3 Pi/4, 5 Pi/4, -Pi/4}}], {r, 0.01, 0.9999}, 
   PlotStyle -> Table[Directive[Thick, ColorData[97, i]], {i, 6, 9}], 
   PlotRange -> 1.2, AxesStyle -> Opacity[0.1], ImageSize -> 300]
 ]
Young
  • 7,495
  • 1
  • 20
  • 45
2

Thanks to @Young's answer, I see that it might be a better idea to use another color "scheme" for p2, so that the colors would look more different from those in p1:

enter image description here enter image description here

p1 = ParametricPlot[ 
  Evaluate@
   Table[ReIm[r ( Cos[u] + I  Sin[u])], {r, Range[0.1, 0.9, .2]}],
  {u, -Pi/2, 3 Pi/2},
  PlotStyle -> 
   Table[Directive[Thickness[0.01], ColorData[97, i]], {i, 1, 5}],
  PlotRange -> 1.2,
  AxesStyle -> Opacity[0.2],
  ImageSize -> 250]

p2 = ParametricPlot[ 
  Evaluate@
   Table[ReIm[
     r ( Cos[u] + I  Sin[u])], {u, {Pi/6, 3 Pi/4, 5 Pi/4, -Pi/4}}],
  {r, 0.01, 0.9999},
  PlotStyle -> 
   Table[Directive[Thickness[0.01], ColorData[101, i]], {i, 6, 9}],
  PlotRange -> 1.2,
  AxesStyle -> Opacity[0.1],
  ImageSize -> 250]

enter image description here