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

Skip to content

Commit 4fc9288

Browse files
authored
Merge pull request #11594 from anntzer/docstringscleanups
Some more docstring cleanups.
2 parents c5d604b + 63671b4 commit 4fc9288

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

lib/matplotlib/patches.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ def __init__(self, xy, width, height, angle=0.0, **kwargs):
672672

673673
def get_path(self):
674674
"""
675-
Return the vertices of the rectangle
675+
Return the vertices of the rectangle.
676676
"""
677677
return Path.unit_rectangle()
678678

@@ -696,9 +696,9 @@ def _update_y1(self):
696696
self._y1 = self._y0 + self._height
697697

698698
def _convert_units(self):
699-
'''
700-
Convert bounds of the rectangle
701-
'''
699+
"""
700+
Convert bounds of the rectangle.
701+
"""
702702
x0 = self.convert_xunits(self._x0)
703703
y0 = self.convert_yunits(self._y0)
704704
x1 = self.convert_xunits(self._x1)
@@ -710,33 +710,33 @@ def get_patch_transform(self):
710710
return self._rect_transform
711711

712712
def get_x(self):
713-
"Return the left coord of the rectangle"
713+
"Return the left coord of the rectangle."
714714
return self._x0
715715

716716
def get_y(self):
717-
"Return the bottom coord of the rectangle"
717+
"Return the bottom coord of the rectangle."
718718
return self._y0
719719

720720
def get_xy(self):
721-
"Return the left and bottom coords of the rectangle"
721+
"Return the left and bottom coords of the rectangle."
722722
return self._x0, self._y0
723723

724724
def get_width(self):
725-
"Return the width of the rectangle"
725+
"Return the width of the rectangle."
726726
return self._width
727727

728728
def get_height(self):
729-
"Return the height of the rectangle"
729+
"Return the height of the rectangle."
730730
return self._height
731731

732732
def set_x(self, x):
733-
"Set the left coord of the rectangle"
733+
"Set the left coord of the rectangle."
734734
self._x0 = x
735735
self._update_x1()
736736
self.stale = True
737737

738738
def set_y(self, y):
739-
"Set the bottom coord of the rectangle"
739+
"Set the bottom coord of the rectangle."
740740
self._y0 = y
741741
self._update_y1()
742742
self.stale = True
@@ -755,13 +755,13 @@ def set_xy(self, xy):
755755
self.stale = True
756756

757757
def set_width(self, w):
758-
"Set the width of the rectangle"
758+
"Set the width of the rectangle."
759759
self._width = w
760760
self._update_x1()
761761
self.stale = True
762762

763763
def set_height(self, h):
764-
"Set the height of the rectangle"
764+
"Set the height of the rectangle."
765765
self._height = h
766766
self._update_y1()
767767
self.stale = True

lib/matplotlib/tri/triinterpolate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,8 +1138,8 @@ def compute_geom_weights(self):
11381138
# modulo 1. is safer regarding round-off errors (flat triangles).
11391139
angle = np.abs(np.mod((alpha2-alpha1) / np.pi, 1.))
11401140
# Weight proportional to angle up np.pi/2; null weight for
1141-
# degenerated cases 0. and np.pi (Note that `angle` is normalized
1142-
# by np.pi)
1141+
# degenerated cases 0 and np.pi (note that `angle` is normalized
1142+
# by np.pi).
11431143
weights[:, ipt] = 0.5 - np.abs(angle-0.5)
11441144
return weights
11451145

0 commit comments

Comments
 (0)