8000 DOC: add more explanatory docstrings · matplotlib/matplotlib@0dfdfd6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0dfdfd6

Browse files
committed
DOC: add more explanatory docstrings
1 parent d46c161 commit 0dfdfd6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/matplotlib/patches.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1671,7 +1671,12 @@ def theta_stretch(theta, scale):
16711671
if (
16721672
# if we need to stretch the angles because we are distorted
16731673
width != height
1674-
# and we are not doing a full circle
1674+
# 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.
16751680
and not (theta1 != theta2 and theta1 % 360 == theta2 % 360)
16761681
):
16771682
theta1 = theta_stretch(self.theta1, width / height)

0 commit comments

Comments
 (0)
0