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

Skip to content

Commit 1d8d5c5

Browse files
committed
fix some pep8 issues overseen by autopep8
1 parent 64dfd4a commit 1d8d5c5

6 files changed

+13
-10
lines changed

examples/api/barchart_demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ def autolabel(rects):
3131
# attach some text labels
3232
for rect in rects:
3333
height = rect.get_height()
34-
ax.text(rect.get_x() + rect.get_width()/2., 1.05*height, '%d' % int(height),
34+
ax.text(rect.get_x() + rect.get_width()/2., 1.05*height,
35+
'%d' % int(height),
3536
ha='center', va='bottom')
3637

3738
autolabel(rects1)

examples/api/compound_path.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
vertices = []
1313
codes = []
1414

15-
codes = [Path.MOVETO] + [Path.LINETO]* 3 + [Path.CLOSEPOLY]
15+
codes = [Path.MOVETO] + [Path.LINETO]*3 + [Path.CLOSEPOLY]
1616
vertices = [(1, 1), (1, 2), (2, 2), (2, 1), (0, 0)]
1717

1818
codes += [Path.MOVETO] + [Path.LINETO]*2 + [Path.CLOSEPOLY]

examples/api/custom_projection_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ class HammerTransform(Transform):
396396

397397
def transform_non_affine(self, ll):
398398
"""
399-
Override the transform_non_affine method to implement the custom
399+
Override the transform_non_affine method to implement the custom
400400
transform.
401401
402402
The input and output are Nx2 numpy arrays.

examples/api/custom_scale_example.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ def inverted(self):
134134
Override this method so matplotlib knows how to get the
135135
inverse transform for this transform.
136136
"""
137-
return MercatorLatitudeScale.InvertedMercatorLatitudeTransform(self.thresh)
137+
return MercatorLatitudeScale.InvertedMercatorLatitudeTransform(
138+
self.thresh)
138139

139140
class InvertedMercatorLatitudeTransform(mtransforms.Transform):
140141
input_dims = 1

examples/api/font_family_rc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
and for the font.family you set a list of font styles to try to find
1212
in order::
1313
14-
rcParams['font.sans-serif'] = ['Tahoma', 'Bitstream Vera Sans', 'Lucida Grande', 'Verdana']
14+
rcParams['font.sans-serif'] = ['Tahoma', 'Bitstream Vera Sans',
15+
'Lucida Grande', 'Verdana']
1516
1617
"""
1718

examples/api/font_file.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
if sys.platform == 'win32':
1818
fpath = 'C:\\Windows\\Fonts\\Tahoma.ttf'
1919
elif sys.platform.startswith('linux'):
20-
fonts = ['/usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf',
21-
'/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf',
22-
'/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf',
23-
]
20+
basedir = '/usr/share/fonts/truetype'
21+
fonts = ['freefont/FreeSansBoldOblique.ttf',
22+
'ttf-liberation/LiberationSans-BoldItalic.ttf',
23+
'msttcorefonts/Comic_Sans_MS.ttf']
2424
for fpath in fonts:
25-
if os.path.exists(fpath):
25+
if os.path.exists(os.path.join(basedir, fpath)):
2626
break
2727
else:
2828
fpath = '/Library/Fonts/Tahoma.ttf'

0 commit comments

Comments
 (0)