Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions lib/matplotlib/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ def __init__(self, xy, width, height, angle=0.0, **kwargs):

def get_path(self):
"""
Return the vertices of the rectangle
Return the vertices of the rectangle.
"""
return Path.unit_rectangle()

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

def _convert_units(self):
'''
Convert bounds of the rectangle
'''
"""
Convert bounds of the rectangle.
"""
x0 = self.convert_xunits(self._x0)
y0 = self.convert_yunits(self._y0)
x1 = self.convert_xunits(self._x1)
Expand All @@ -710,33 +710,33 @@ def get_patch_transform(self):
return self._rect_transform

def get_x(self):
"Return the left coord of the rectangle"
"Return the left coord of the rectangle."
return self._x0

def get_y(self):
"Return the bottom coord of the rectangle"
"Return the bottom coord of the rectangle."
return self._y0

def get_xy(self):
"Return the left and bottom coords of the rectangle"
"Return the left and bottom coords of the rectangle."
return self._x0, self._y0

def get_width(self):
"Return the width of the rectangle"
"Return the width of the rectangle."
return self._width

def get_height(self):
"Return the height of the rectangle"
"Return the height of the rectangle."
return self._height

def set_x(self, x):
"Set the left coord of the rectangle"
"Set the left coord of the rectangle."
self._x0 = x
self._update_x1()
self.stale = True

def set_y(self, y):
"Set the bottom coord of the rectangle"
"Set the bottom coord of the rectangle."
self._y0 = y
self._update_y1()
self.stale = True
Expand All @@ -755,13 +755,13 @@ def set_xy(self, xy):
self.stale = True

def set_width(self, w):
"Set the width of the rectangle"
"Set the width of the rectangle."
self._width = w
self._update_x1()
self.stale = True

def set_height(self, h):
"Set the height of the rectangle"
"Set the height of the rectangle."
self._height = h
self._update_y1()
self.stale = True
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/tri/triinterpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,8 +1138,8 @@ def compute_geom_weights(self):
# modulo 1. is safer regarding round-off errors (flat triangles).
angle = np.abs(np.mod((alpha2-alpha1) / np.pi, 1.))
# Weight proportional to angle up np.pi/2; null weight for
# degenerated cases 0. and np.pi (Note that `angle` is normalized
# by np.pi)
# degenerated cases 0 and np.pi (note that `angle` is normalized
# by np.pi).
weights[:, ipt] = 0.5 - np.abs(angle-0.5)
return weights

Expand Down