Revising this answer I propose extracting contours from ContourPlot
, converting to polar, scaling magnitude, then converting back and plotting. I will use code from ListLogLinearPlot for the whole real numbers:
logify[_][x_ /; x == 0] := 0
logify[off_][x_] := Sign[x] Max[0, (off + Re@Log@x)/off]
inverse[off_][x_] := Sign[x] Exp[(Abs[x] - 1) off]
logscale[n_] := {logify[n], inverse[n]}
And an auxiliary function:
logTheta[m_][pts_] :=
FromPolarCoordinates /@
MapAt[logify[m], ToPolarCoordinates /@ pts, {All, 1}];
Now:
cp = ContourPlot[
729 + x^4 + y^4 + 3 x^2 (-225 + y^2) == 730 y^2, {x, -32, 32}, {y, -34, 34},
MaxRecursion -> 3];
pts = Cases[Normal @ cp, Line[x_] :> x, -3];
ListLinePlot[logTheta[2] /@ pts
, Ticks -> Charting`ScaledTicks @ logscale[2]
, AspectRatio -> 1
]
An additional example to better illustrate variable "zoom" in the scaling:
cp2 = ContourPlot[
Evaluate[x^2 + y^2 == # & /@ (3^Range[-3, 5])], {x, -16, 16}, {y, -16, 16},
PlotPoints -> 50]
pts2 = Cases[Normal@cp2, Line[x_] :> x, -3];
ListLinePlot[logTheta[#] /@ pts2
, Ticks -> Charting`ScaledTicks @ logscale[#]
, AspectRatio -> 1
] & /@ {2, 3, 4}
Beware: if the "zoom" is not enough you'll create singularities in the polar/Cartesian conversion and get errors instead of a plot:
logTheta[1] /@ pts2;
FromPolarCoordinates::bdpt: Evaluation point {0,1.92728} is not a
valid set of polar or hyperspherical coordinates. >>
I expect this will be a problem if you have contours that cross the origin, but I will have to come back to that later.
Controlling tick marks
Here is a way to "manually" generate a specification for Ticks
or FrameTicks
.
cp = ContourPlot[
729 + x^4 + y^4 + 3 x^2 (-225 + y^2) == 730 y^2, {x, -32, 32}, {y, -34, 34},
MaxRecursion -> 3];
pts = Cases[Normal@cp, Line[x_] :> x, -3];
log = logTheta[2] /@ pts;
ticks = {#, inverse[2][#]} & /@ FindDivisions[#, 11] & /@ CoordinateBounds[log];
ListLinePlot[log, Ticks -> ticks, AspectRatio -> 1]
And for the additional example:
cp2 = ContourPlot[
Evaluate[x^2 + y^2 == # & /@ (3^Range[-3, 5])], {x, -16, 16}, {y, -16, 16},
PlotPoints -> 50]
pts2 = Cases[Normal@cp2, Line[x_] :> x, -3];
Table[
log = logTheta[b] /@ pts2;
ticks = {#, inverse[b][#]} & /@ FindDivisions[#, 11] & /@ CoordinateBounds[log];
ListLinePlot[log, Ticks -> ticks, AspectRatio -> 1, ImageSize -> 200],
{b, {2, 3, 4}}
] // Row