How to use Filling in PolarPlot?

pp = PolarPlot[{1, 1 + 1/10 Sin[10 t]}, {t, 0, 2 Pi}, PlotStyle -> Thick];


Show[pp, Epilog -> {LightRed, FilledCurve[Cases[pp, _Line, All]]}]

enter image description here

To fill between each curve and the origin:

pp /. l_Line :> {l, Opacity[.5], FilledCurve[l]}

enter image description here

To fill between pairs of multiple curves:

pp = PolarPlot[{1, 1 + 1/10 Sin[10 t], 3/2 + 1/10 Sin[20 t], 2 + 1/10 Sin[20 t]},
  {t, 0, 2 Pi}, PlotStyle -> Thick, ImageSize -> Medium];

pp2 = Show[pp, Epilog -> {Opacity[.5], {RandomColor[], FilledCurve@#} &@
      Cases[pp, _Line, All]}];

pp3 = Show[pp, Epilog -> {Opacity[.5], {RandomColor[], FilledCurve@#} & /@ 
      Partition[Cases[pp, _Line, All], 2]}];

pp4 = Show[pp, Epilog -> {Opacity[.5], {RandomColor[], FilledCurve@#} & /@ 
      Partition[Cases[pp, _Line, All], 2, 1]}];

Multicolumn[{pp, pp2, pp3, pp4}, 2, Appearance -> "Horizontal"]

enter image description here


Your question answered comprehensively in this post with various methods.

Simple solution

1- Use PolarPlot to generate graphics and store it in a variable

p1 = PolarPlot[{1, 1 + 1/10 Sin[10 t]}, {t, 0, 2 Pi}];

2- Use Cases to extract graphics's lines (it will give you list of two lines so apply Flatten) and create a polygon from that. (by nature overlapping areas will be ignored so it will only shows the area in between) then apply Graphics

p2 = Graphics[{Gray, Opacity[.25], 
    Polygon@Flatten[Cases[p1[[1]], Line[x_] -> x, Infinity], 1]}];

3- Use Show to plot both:

Show[p1,p2]

enter image description here


Clear["Global`*"]

Since PolarPlot does not use the Filling option, fill the regions using RegionPlot.

Clear[x, y]

Show[
 PolarPlot[{1, 1 + 1/10 Sin[10 t]}, {t, 0, 2 Pi}],
 RegionPlot[
  {(1 + 1/10 Sin[10 ArcTan[x, y]])^2 <= x^2 + y^2 <= 1,
   1 <= x^2 + y^2 <= (1 + 1/10 Sin[10 ArcTan[x, y]])^2},
  {x, -1.1, 1.1}, {y, -1.1, 1.1},
  PlotPoints -> 100, MaxRecursion -> 5,
  BoundaryStyle -> None]]

enter image description here

Tags:

Plotting