Q: Disable rounding up of PolarAxesOrigin Bug introduced in 8.0 or earlier and persisting through 13.0.0 or later

How to disable rounding up the radius which is used to calculate the origin of the polar axes with the option PolarAxesOrigin?
Example:
PolarPlot[Sqrt[n], {n, 0, 20}, PolarAxes -> True,
PolarAxesOrigin -> {0, 7}, PolarTicks -> {"Degrees", Automatic}]


It rounds 7 to 8, 13 to 15 and 521 to 600.

A: It seems like PolarPlot uses FindDivisions internally to generate the ticks and chooses the last point as the origin, which causes this behaviour:
FindDivisions[{0, 7}, 4]
(* {0, 2, 4, 6, 8} *)

This is in fact described in the documentation for FindDivisions (under "Details and Options"):

The first and last numbers may be slightly outside the range $x_\min$ to $x_\max$

I've run into similar subtle quirks with PolarPlot – especially when styling/customizing it a particular way — and usually end up writing my own version of PolarPlot using graphics primitives.

A: The simplest workaround:
PolarPlot[Sqrt[n], {n, 0, 20}, PolarAxes -> {True, False}, 
 PolarAxesOrigin -> {0, 7}, PolarTicks -> {"Degrees", Automatic}, 
 Axes -> {True, False}]



A: I have contacted Technical Support and they have confirmed this to be a bug. They have also provided the following workaround:
plot = PolarPlot[7 Sin[x], {x, 0, 2 Pi}, PolarAxesOrigin -> {0, 7}, 
PolarAxes -> True]


(* Rescale the circular part. *)
plot[[1, 5, 1]] = Scale[plot[[1, 5, 1]], {7/8, 7/8}];

(* Remove the tick "8". *)
Cases[plot[[1, 5, 2]], Text[___], Infinity]


{Text[0., Offset[{0, -8}, Scaled[{0., -0.006}, {0, 0}]], {-1, 0}], 
Text[2., Offset[{0, -8}, Scaled[{0., -0.006}, {2, 0}]], {-1, 0}], 
Text[4., Offset[{0, -8}, Scaled[{0., -0.006}, {4, 0}]], {-1, 0}], 
Text[6., Offset[{0, -8}, Scaled[{0., -0.006}, {6, 0}]], {-1, 0}], 
Text[8., Offset[{0, -8}, Scaled[{0., -0.006}, {8, 0}]], {-1, 0}]}


Position[plot[[1, 5, 2]], Text[___], Infinity]


{{4, 1}, {4, 2}, {4, 3}, {4, 4}, {4, 5}}


plot[[1, 5, 2]] = Delete[plot[[1, 5, 2]], {{4, 5}}];
plot



A: We can use the function fixPolarAxes from this answer to post-process PolarPlot output to fix polar axes/ticks/gridlines:
plot = PolarPlot[7 Sin[x], {x, 0, 2 Pi},
  PolarAxesOrigin -> {0, 7}, PolarAxes -> True]


fixPolarAxes[7] @ plot


ClearAll[fixPolarAxes]

fixPolarAxes[radius_] := 
  Module[{maxradius = Max @ Cases[#, Circle[_, r_, _] :> r, All], scale},
   scale = radius / maxradius;
   ReplaceAll[
    {Circle[c_, maxradius, a_] :> Circle[c, radius, a] (* change angular axis radius *),
     Circle[_, r_/; r > radius,_] -> {} (* remove unwanted radial gridlines *),
     Text[_, Offset[_, Scaled[_, a_ /; Norm[a] > radius]], ___] -> 
           {} (* remove unwanted radial tick labels *),
     Style[Line[{Scaled[_, a_], _Scaled}] /; Norm[a] > radius, Except[{}]] -> 
           {} (* remove unwanted radial ticks *),
     Text[t_, Offset[a_, b : Except[_Scaled]], c___] :> 
          Text[t, Offset[a, scale b], c] (* move angular labels towards new axis*),
     Line[{{0, 0}, a : {_, _}}] :>
       Line[{{0, 0}, scale a}] (* crop the radial axis and angular gridlines *),
     Style[Line[x_], {}] :>
      {Line[x /. { {{a_, b_}, Scaled[c_, d_]} :> 
          {scale {a, b}, Scaled[c, scale d]} (* relocate minor angular ticks *),
      Scaled[a_, b_] :> Scaled[a, scale b] (* relocate major angular ticks *)}]}}] @ #]&

