# How to plot polar coordinates?

I'm trying to plot polar coordinates, that is to plot surfaces of constant parameters $$r$$ and $$\theta$$. Which are related to the cartesian ones by $$x = r \sin \theta\\ y = r \cos \theta$$ One way is to use countor plot as

Show[ContourPlot[ Evaluate@Table[x^2 + y^2 == a^2, {a, 1, 6}], {x, -5, 5}, {y, -5, 5},ContourStyle -> Directive[Dashed, Gray]],
ContourPlot[Evaluate@Table[y == Tan[a] x, {a, 0,\[Pi], 1/\[Pi]}], {x, -5, 5}, {y, -5, 5}, ContourStyle -> Directive[Dashed, Gray]]]


which results in

This is not bad but there are some problem around the $$\{0,0\}$$ point and I'm also struggling to nicely devide the angle by the radial lines.

Another options is

ParametricPlot[{r Cos[t], r Sin[t]}, {t, 0, 2 \[Pi]}, {r, 0, 3}, Mesh -> Automatic]


which results in

This is a much nicer graph, but I am not able to remove the colour and I am also lacking control with the Mesh.

Is there a simpler way to do this? Note that I am aware that we can do this manually by Graphics and Line functions, but I want to plot other, more complicated coordinates where this would no be an options.

ParametricPlot[{r Cos[t], r Sin[t]}, {t, 0, 2 \[Pi]}, {r, 0, 3},
Mesh -> Automatic, PlotStyle -> None];


ParametricPlot[{r Cos[t], r Sin[t]}, {t, 0, 2 \[Pi]}, {r, 0, 3}, Mesh -> 4, PlotStyle -> None]


ParametricPlot[{r Cos[t], r Sin[t]}, {t, 0, 2 \[Pi]}, {r, 0, 3},
Mesh -> {Subdivide[0, 2 Pi, 12], Subdivide[0, 2 Pi, 12]},
PlotStyle -> None]


By changing one or both Subdivide - parameters, MeshStyle or BoundaryStyle you have full control:

ParametricPlot[{r Cos[t], r Sin[t]}, {t, 0, 2 \[Pi]}, {r, 0, 3},
Mesh -> {Subdivide[0, 2 Pi, 12], Subdivide[0, 2 Pi, 4]},
BoundaryStyle -> {Red, Thickness[0.005], Dashed},
MeshStyle -> Dashed,
PlotStyle -> None]


• Is there a way to have more control over Mesh lines? For example I would like to divide the circle equally by having a radial line at each π/6 radians. That is to have 12 radial lines but at the same time make sure that one line coincides with the y-axis. Oct 7, 2023 at 9:02

Using PolarPlot:

n = 6;
PolarPlot[{ n}, {θ, 0, 2 π}
, PolarAxes -> {False, False}
, PlotRange -> {{-n, n}, {-n, n}}
, PlotStyle -> None
, PolarGridLines -> {Range[0, 2 π, π/6], Range[1, n]}
, GridLinesStyle -> {{Gray, Dashed}, {Gray, Dashed}}
, PolarTicks -> {Range[0, 2 π - π/6, π/6], Range[1, n, 1]}
, Frame -> True
, Axes -> False
, Epilog -> {FaceForm[White], EdgeForm[Gray]
, Disk[{0, 0}, 0.15]}
]


You can experiment with the PolarAxes options and adjust PlotRangePadding as required.

You may prescibe Mesh for both coordinates and an adopted Array of Colors

   ParametricPlot[{r Cos[t], r Sin[t]}, {t, 0, 2 \[Pi]}, {r, 0, 3},
Mesh -> {5, 7},
MeshShading -> RandomColor[ RGBColor[ _, _, 0.2], {5, 7}]]


The mesh can be given explitely in coordinates

     ParametricPlot[{r Cos[t], r Sin[t]}, {t, 0, 2 \[Pi]}, {r, 0, 3},
Mesh -> {RandomReal[{0, 2 \[Pi]}, 5], RandomReal[{1, 3}, 7]},
MeshShading -> RandomColor[ Hue[ _, 0.7, 0.8], {5, 7}]]