We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d46c161 commit 0dfdfd6Copy full SHA for 0dfdfd6
lib/matplotlib/patches.py
@@ -1671,7 +1671,12 @@ def theta_stretch(theta, scale):
1671
if (
1672
# if we need to stretch the angles because we are distorted
1673
width != height
1674
- # and we are not doing a full circle
+ # and we are not doing a full circle.
1675
+ #
1676
+ # 0 and 360 do not exactly round-trip through the angle
1677
+ # stretching (due to both float precision limitations and
1678
+ # the difference between the range of arctan2 [-pi, pi] and
1679
+ # this method [0, 360]) so avoid doing it if we don't have to.
1680
and not (theta1 != theta2 and theta1 % 360 == theta2 % 360)
1681
):
1682
theta1 = theta_stretch(self.theta1, width / height)
0 commit comments