# How to assign two sets of colors for two ParametricPlot? [closed]

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]


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.

## closed as off-topic by Young, MarcoB, ubpdqn, garej, JackSep 21 '17 at 11:55

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Young, MarcoB, ubpdqn, garej, Jack
If this question can be reworded to fit the rules in the help center, please edit the question.

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]
]

• Thanks. Is there something special about that 97? – Jack Sep 21 '17 at 1:29
• 97 is the default color palette used by Mathematica – Young Sep 21 '17 at 1:30
• Found this related: mathematica.stackexchange.com/a/54632/664 Thanks! – Jack Sep 21 '17 at 2:21

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:

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]