# Parametric polar plot

I have a function of a parameter $$x$$ that gives an angle, say $$\theta=f(x)$$ (not easily invertible), and I want to plot another function of $$x$$, $$g(x)$$, in a polar plot. How can I do it?

• You may calculate some value pairs: {x,phi}, then invert them: {phi,x} and calulate an interpolating function. Aug 26, 2022 at 15:34
• Give an example of $f$ and $g$ or you will only get hand-waving answers. Aug 26, 2022 at 15:38
• Does ParametricPlot do what you need? Aug 26, 2022 at 20:31

Since x is in Cartesian Coordinate and θ is in Polar Coordinate, we need to use only one Coordinate.

## Method-1

Translate to Polar Coordinate. ( x=r Cos[θ]) and use ParametricPlot and MeshFunction.

Clear[f, x];
f[x_] = x*Sin[2 x^2];
x[r_, θ_] =
TransformedField["Cartesian" -> "Polar", x, {x, y} -> {r, θ}];
(*r Cos[θ]*)
ParametricPlot[
r {Cos[θ], Sin[θ]}, {r, 1,
4}, {θ, π/8, π/2}, PlotStyle -> Yellow,
BoundaryStyle -> None,
MeshFunctions ->
Function[{x, y, r, θ}, θ - f[r*Cos[θ]]],
Mesh -> {{0}}, Axes -> False, PlotPoints -> 80, MaxRecursion -> 4,
MeshStyle -> {Thick, Red}]


## Method-2

Translate to Polar Coordinate. ( x=r Cos[θ]),use ContourPlot in {r, θ} coordinate at first and then mapping to {x,y} coordinate.

Clear[f, x];
f[x_] = x*Sin[2 x^2];
x[r_, θ_] =
TransformedField["Cartesian" -> "Polar", x, {x, y} -> {r, θ}];
(*r Cos[θ]*)
reg = ParametricPlot[
r {Cos[θ], Sin[θ]}, {θ, π/8, π/2}, {r,
1, 4}, PlotStyle -> Yellow, BoundaryStyle -> None];
polar = ContourPlot[θ == f[x[r, θ]], {r, 1,
4}, {θ, π/8, π/2}, PlotPoints -> 60,
MaxRecursion -> 4, PlotRange -> All];
cartesian =
polar /. {r_Real, θ_Real} -> r {Cos[θ], Sin[θ]};
Show[reg, cartesian, Axes -> False]


## Method-3

Translate to Cartisian Coordinate. (θ=θ[x, y],r=r[x,y])

Clear[θ, r];
θ[x_, y_] = Arg[x + I*y];
r[x_, y_] = Norm[x + I*y];
f[x_] = x*Sin[2 x^2];
reg = ImplicitRegion[π/8 <= θ[x, y] <= π/2 &&
1 <= r[x, y] <= 4, {x, y}];
ContourPlot[θ[x, y] == f[x], {x, 0, 5}, {y, 0, 5},
RegionFunction -> Function[{x, y}, {x, y} ∈ reg],
Prolog -> {Yellow, DiscretizeRegion[reg]}]