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

Skip to content

Commit 0b72b18

Browse files
author
Brian Mattern
committed
use """ everywhere instead of '''
1 parent 3cd97ea commit 0b72b18

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

lib/matplotlib/contour.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def get_rotation(self):
4949

5050

5151
class ContourLabeler:
52-
'''Mixin to provide labelling capability to ContourSet'''
52+
"""Mixin to provide labelling capability to ContourSet"""
5353

5454
def clabel(self, *args, **kwargs):
5555
"""
@@ -620,7 +620,7 @@ def add_label_near(self, x, y, inline=True, inline_spacing=5,
620620
paths.append(mpath.Path(n))
621621

622622
def pop_label(self, index=-1):
623-
'''Defaults to removing last label, but any index can be supplied'''
623+
"""Defaults to removing last label, but any index can be supplied"""
624624
self.labelCValues.pop(index)
625625
t = self.labelTexts.pop(index)
626626
t.remove()
@@ -687,7 +687,7 @@ def labels(self, inline, inline_spacing):
687687

688688

689689
def _find_closest_point_on_leg(p1, p2, p0):
690-
'''find closest point to p0 on line segment connecting p1 and p2'''
690+
"""find closest point to p0 on line segment connecting p1 and p2"""
691691

692692
# handle degenerate case
693693
if np.all(p2 == p1):
@@ -712,10 +712,10 @@ def _find_closest_point_on_leg(p1, p2, p0):
712712

713713

714714
def _find_closest_point_on_path(lc, point):
715-
'''
715+
"""
716716
lc: coordinates of vertices
717717
point: coordinates of test point
718-
'''
718+
"""
719719

720720
# find index of closest vertex for this segment
721721
ds = np.sum((lc - point[None, :])**2, 1)
@@ -1102,7 +1102,7 @@ def changed(self):
11021102
cm.ScalarMappable.changed(self)
11031103

11041104
def _autolev(self, z, N):
1105-
'''
1105+
"""
11061106
Select contour levels to span the data.
11071107
11081108
We need two more levels for filled contours than for
@@ -1111,7 +1111,7 @@ def _autolev(self, z, N):
11111111
a single contour boundary, say at z = 0, requires only
11121112
one contour line, but two filled regions, and therefore
11131113
three levels to provide boundaries for both regions.
1114-
'''
1114+
"""
11151115
if self.locator is None:
11161116
if self.logscale:
11171117
self.locator = ticker.LogLocator()
@@ -1280,11 +1280,11 @@ def _process_linestyles(self):
12801280
return tlinestyles
12811281

12821282
def get_alpha(self):
1283-
'''returns alpha to be applied to all ContourSet artists'''
1283+
"""returns alpha to be applied to all ContourSet artists"""
12841284
return self.alpha
12851285

12861286
def set_alpha(self, alpha):
1287-
'''sets alpha for all ContourSet artists'''
1287+
"""sets alpha for all ContourSet artists"""
12881288
self.alpha = alpha
12891289
self.changed()
12901290

@@ -1479,14 +1479,14 @@ def _contour_args(self, args, kwargs):
14791479
return (x, y, z)
14801480

14811481
def _check_xyz(self, args, kwargs):
1482-
'''
1482+
"""
14831483
For functions like contour, check that the dimensions
14841484
of the input arrays match; if x and y are 1D, convert
14851485
them to 2D using meshgrid.
14861486
14871487
Possible change: I think we should make and use an ArgumentError
14881488
Exception class (here and elsewhere).
1489-
'''
1489+
"""
14901490
x, y = args[:2]
14911491
self.ax._process_unit_info(xdata=x, ydata=y, kwargs=kwargs)
14921492
x = self.ax.convert_xunits(x)
@@ -1534,7 +1534,7 @@ def _check_xyz(self, args, kwargs):
15341534
return x, y, z
15351535

15361536
def _initialize_x_y(self, z):
1537-
'''
1537+
"""
15381538
Return X, Y arrays such that contour(Z) will match imshow(Z)
15391539
if origin is not None.
15401540
The center of pixel Z[i,j] depends on origin:
@@ -1545,7 +1545,7 @@ def _initialize_x_y(self, z):
15451545
as in imshow.
15461546
If origin is None and extent is not None, then extent
15471547
will give the minimum and maximum values of x and y.
1548-
'''
1548+
"""
15491549
if z.ndim != 2:
15501550
raise TypeError("Input must be a 2D array.")
15511551
else:

0 commit comments

Comments
 (0)