Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e41d033

Browse files
committed
Document how Path.arc handles >360 degree arcs.
1 parent c586b55 commit e41d033

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/matplotlib/path.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,10 @@ def arc(cls, theta1, theta2, n=None, is_wedge=False):
856856
Return an arc on the unit circle from angle
857857
*theta1* to angle *theta2* (in degrees).
858858
859+
*theta2* is unwrapped to produce the shortest arc within 360 degrees.
860+
That is, if *theta2* > *theta1* + 360, the arc will be from *theta1* to
861+
*theta2* - 360 and not a full circle plus some extra overlap.
862+
859863
If *n* is provided, it is the number of spline segments to make.
860864
If *n* is not provided, the number of spline segments is
861865
determined based on the delta between *theta1* and *theta2*.
@@ -931,6 +935,10 @@ def wedge(cls, theta1, theta2, n=None):
931935
Return a wedge of the unit circle from angle
932936
*theta1* to angle *theta2* (in degrees).
933937
938+
*theta2* is unwrapped to produce the shortest wedge within 360 degrees.
939+
That is, if *theta2* > *theta1* + 360, the wedge will be from *theta1*
940+
to *theta2* - 360 and not a full circle plus some extra overlap.
941+
934942
If *n* is provided, it is the number of spline segments to make.
935943
If *n* is not provided, the number of spline segments is
936944
determined based on the delta between *theta1* and *theta2*.

0 commit comments

Comments
 (0)