@@ -1518,28 +1518,26 @@ def transform_path_non_affine(self, path):
1518
1518
1519
1519
def transform_angles (self , angles , pts , radians = False , pushoff = 1e-5 ):
1520
1520
"""
1521
- Performs transformation on a set of angles anchored at
1522
- specific locations.
1521
+ Transforms a set of angles anchored at specific locations.
1523
1522
1524
- The *angles* must be a column vector (i.e., numpy array).
1525
-
1526
- The *pts* must be a two-column numpy array of x,y positions
1527
- (angle transforms currently only work in 2D). This array must
1528
- have the same number of rows as *angles*.
1529
-
1530
- *radians* indicates whether or not input angles are given in
1531
- radians (True) or degrees (False; the default).
1532
-
1533
- *pushoff* is the distance to move away from *pts* for
1534
- determining transformed angles (see discussion of method
1535
- below).
1536
-
1537
- The transformed angles are returned in an array with the same
1538
- size as *angles*.
1539
-
1540
- The generic version of this method uses a very generic
1541
- algorithm that transforms *pts*, as well as locations very
1542
- close to *pts*, to find the angle in the transformed system.
1523
+ Parameters
1524
+ ----------
1525
+ angles : (N,) array-like
1526
+ The angles to transform.
1527
+ pts : (N, 2) array-like
1528
+ The points where the angles are anchored.
1529
+ radians : bool, default: False
1530
+ Whether *angles* are radians or degrees.
1531
+ pushoff : float
1532
+ For each point in *pts* and angle in *angles*, the transformed
1533
+ angle is computed by transforming a segment of length *pushoff*
1534
+ starting at that point and making that angle relative to the
1535
+ horizontal axis, and measuring the angle between the horizontal
1536
+ axis and the transformed segment.
1537
+
1538
+ Returns
1539
+ -------
1540
+ transformed_angles : (N,) array
1543
1541
"""
1544
1542
# Must be 2D
1545
1543
if self .input_dims != 2 or self .output_dims != 2 :
0 commit comments