10000 pep8 fix E124-E129 · matplotlib/matplotlib@6289558 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6289558

Browse files
committed
pep8 fix E124-E129
Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
1 parent eef2efc commit 6289558

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+280
-280
lines changed

examples/api/scatter_piecharts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737

3838
fig, ax = plt.subplots()
3939
ax.scatter(np.arange(3), np.arange(3), marker=(xy1, 0),
40-
s=[s1*s1*_ for _ in sizes], facecolor='blue')
40+
s=[s1*s1*_ for _ in sizes], facecolor='blue')
4141
ax.scatter(np.arange(3), np.arange(3), marker=(xy2, 0),
42-
s=[s2*s2*_ for _ in sizes], facecolor='green')
42+
s=[s2*s2*_ for _ in sizes], facecolor='green')
4343
ax.scatter(np.arange(3), np.arange(3), marker=(xy3, 0),
44-
s=[s3*s3*_ for _ in sizes], facecolor='red')
44+
s=[s3*s3*_ for _ in sizes], facecolor='red')
4545

4646
plt.show()

examples/axes_grid/demo_floating_axes.py

+1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import mpl_toolkits.axisartist.angle_helper as angle_helper
55
from matplotlib.projections import PolarAxes
66
from mpl_toolkits.axisartist.grid_finder import (FixedLocator, MaxNLocator,
7-
DictFormatter)
7+
DictFormatter)
88
import matplotlib.pyplot as plt
99

1010

examples/event_handling/data_browser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def __init__(self):
1414
self.text = ax.text(0.05, 0.95, 'selected: none',
1515
transform=ax.transAxes, va='top')
1616
self.selected, = ax.plot([xs[0]], [ys[0]], 'o', ms=12, alpha=0.4,
17-
color='yellow', visible=False)
17+
color='yellow', visible=False)
1818

1919
def onpress(self, event):
2020
if self.lastind is None:

examples/event_handling/pipong.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ def __init__(self, ax):
149149
self.pads.append(Pad(pB, padBx, padBy, 'r'))
150150
self.pucks = []
151151
self.i = self.ax.annotate(instructions, (.5, 0.5),
152-
name='monospace',
153-
verticalalignment='center',
154-
horizontalalignment='center',
155-
multialignment='left',
156-
textcoords='axes fraction', animated=True)
152+
name='monospace',
153+
verticalalignment='center',
154+
horizontalalignment='center',
155+
multialignment='left',
156+
textcoords='axes fraction', animated=True)
157157
self.canvas.mpl_connect('key_press_event', self.key_press)
158158

159159
def draw(self, evt):

examples/event_handling/zoom_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
axsrc = figsrc.add_subplot(111, xlim=(0, 1), ylim=(0, 1), autoscale_on=False)
1818
axzoom = figzoom.add_subplot(111, xlim=(0.45, 0.55), ylim=(0.4, .6),
19-
autoscale_on=False)
19+
autoscale_on=False)
2020
axsrc.set_title('Click to zoom')
2121
axzoom.set_title('zoom window')
2222
x, y, s, c = numpy.random.rand(4, 200)

examples/images_contours_and_fields/interpolation_none_vs_nearest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
big_im = plt.imread(big_im_path)
2121
# Define small image
2222
small_im = np.array([[0.25, 0.75, 1.0, 0.75], [0.1, 0.65, 0.5, 0.4],
23-
[0.6, 0.3, 0.0, 0.2], [0.7, 0.9, 0.4, 0.6]])
23+
[0.6, 0.3, 0.0, 0.2], [0.7, 0.9, 0.4, 0.6]])
2424

2525
# Create a 2x2 table of plots
2626
fig = plt.figure(figsize=[8.0, 7.5])
@@ -33,7 +33,7 @@
3333
ax = plt.subplot(2, 2, 4)
3434
ax.imshow(small_im, interpolation='nearest')
3535
plt.subplots_adjust(left=0.24, wspace=0.2, hspace=0.1,
36-
bottom=0.05, top=0.86)
36+
bottom=0.05, top=0.86)
3737

3838
# Label the rows and columns of the table
3939
fig.text(0.03, 0.645, 'Big Image\nScaled Down', ha='left')

examples/misc/contour_manual.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Points can be ordered clockwise or anticlockwise.
1515
filled01 = [[[0, 0], [0, 4], [1, 3], [1, 2], [2, 0]]]
1616
filled12 = [[[2, 0], [3, 0], [3, 2], [1, 3], [1, 2]], # Note two polygons.
17-
[[1, 4], [3, 4], [3, 3]]]
17+
[[1, 4], [3, 4], [3, 3]]]
1818

1919

2020
plt.figure()

examples/misc/rc_traits.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
flexible_true_trait = traits.Trait(
1515
True,
1616
{'true': True, 't': True, 'yes': True, 'y': True, 'on': True, True: True,
17-
'false': False, 'f': False, 'no': False, 'n': False, 'off': False, False: False
18-
})
17+
'false': False, 'f': False, 'no': False, 'n': False, 'off': False, False: False
18+
})
1919
flexible_false_trait = traits.Trait(False, flexible_true_trait)
2020

2121
colors = {
@@ -95,7 +95,7 @@ def float_to_rgba(ob, name, val):
9595

9696

9797
Color = traits.Trait(RGBA(), float_to_rgba, colorname_to_rgba, RGBA,
98-
hex_to_rgba, tuple_to_rgba)
98+
hex_to_rgba, tuple_to_rgba)
9999

100100

101101
def file_exists(ob, name, val):
@@ -105,14 +105,14 @@ def file_exists(ob, name, val):
105105
linestyles = ('-', '--', '-.', ':', 'steps', 'None')
106106
TICKLEFT, TICKRIGHT, TICKUP, TICKDOWN = range(4)
107107
linemarkers = (None, '.', ',', 'o', '^', 'v', '<', '>', 's',
108-
'+', 'x', 'd', 'D', '|', '_', 'h', 'H',
109-
'p', '1', '2', '3', '4',
110-
TICKLEFT,
111-
TICKRIGHT,
112-
TICKUP,
113-
TICKDOWN,
114-
'None'
115-
)
108+
'+', 'x', 'd', 'D', '|', '_', 'h', 'H',
109+
'p', '1', '2', '3', '4',
110+
TICKLEFT,
111+
TICKRIGHT,
112+
TICKUP,
113+
TICKDOWN,
114+
'None'
115+
)
116116

117117

118118
class LineRC(traits.HasTraits):
@@ -136,8 +136,8 @@ class PatchRC(traits.HasTraits):
136136

137137
timezones = 'UTC', 'US/Central', 'ES/Eastern' # fixme: and many more
138138
backends = ('GTKAgg', 'Cairo', 'GDK', 'GTK', 'Agg',
139-
'GTKCairo', 'PS', 'SVG', 'Template', 'TkAgg',
140-
'WX')
139+
'GTKCairo', 'PS', 'SVG', 'Template', 'TkAgg',
140+
'WX')
141141

142142

143143
class RC(traits.HasTraits):

examples/misc/rec_join_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# Create a new array
1414
r2 = np.empty(12, dtype=[('date', '|O4'), ('high', np.float),
15-
('marker', np.float)])
15+
('marker', np.float)])
1616
r2 = r2.view(np.recarray)
1717
r2.date = r.date[-17:-5]
1818
r2.high = r.high[-17:-5]
@@ -27,5 +27,5 @@
2727

2828
for s in ('inner', 'outer', 'leftouter'):
2929
rec = mlab.rec_join(['date', 'high'], r1, r2,
30-
jointype=s, defaults=defaults)
30+
jointype=s, defaults=defaults)
3131
print("\n%sjoin :\n%s" % (s, mlab.rec2txt(rec)))

examples/mplot3d/mixed_subplots_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def f(t):
4242
Z = np.sin(R)
4343

4444
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1,
45-
linewidth=0, antialiased=False)
45+
linewidth=0, antialiased=False)
4646

4747
ax.set_zlim3d(-1, 1)
4848

examples/mplot3d/polys3d_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
verts.append(list(zip(xs, ys)))
1919

2020
poly = PolyCollection(verts, facecolors=[cc('r'), cc('g'), cc('b'),
21-
cc('y')])
21+
cc('y')])
2222
poly.set_alpha(0.7)
2323
ax.add_collection3d(poly, zs=zs, zdir='y')
2424

examples/mplot3d/subplot3d_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
R = np.sqrt(X**2 + Y**2)
1919
Z = np.sin(R)
2020
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm,
21-
linewidth=0, antialiased=False)
21+
linewidth=0, antialiased=False)
2222
ax.set_zlim3d(-1.01, 1.01)
2323

2424
fig.colorbar(surf, shrink=0.5, aspect=10)

examples/mplot3d/surface3d_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
R = np.sqrt(X**2 + Y**2)
1313
Z = np.sin(R)
1414
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm,
15-
linewidth=0, antialiased=False)
15+
linewidth=0, antialiased=False)
1616
ax.set_zlim(-1.01, 1.01)
1717

1818
ax.zaxis.set_major_locator(LinearLocator(10))

examples/mplot3d/surface3d_demo3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
colors[x, y] = colortuple[(x + y) % len(colortuple)]
2222

2323
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=colors,
24-
linewidth=0, antialiased=False)
24+
linewidth=0, antialiased=False)
2525

2626
ax.set_zlim3d(-1, 1)
2727
ax.w_zaxis.set_major_locator(LinearLocator(6))

examples/pie_and_polar_charts/pie_demo_features.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@
3434
import numpy as np
3535

3636
ax.pie(np.random.random(4), explode=explode, labels=labels, colors=colors,
37-
autopct='%1.1f%%', shadow=True, startangle=90,
37+
autopct='%1.1f%%', shadow=True, startangle=90,
3838
radius=0.25, center=(0, 0), frame=True)
3939
ax.pie(np.random.random(4), explode=explode, labels=labels, colors=colors,
40-
autopct='%1.1f%%', shadow=True, startangle=90,
40+
autopct='%1.1f%%', shadow=True, startangle=90,
4141
radius=0.25, center=(1, 1), frame=True)
4242
ax.pie(np.random.random(4), explode=explode, labels=labels, colors=colors,
43-
autopct='%1.1f%%', shadow=True, startangle=90,
43+
autopct='%1.1f%%', shadow=True, startangle=90,
4444
radius=0.25, center=(0, 1), frame=True)
4545
ax.pie(np.random.random(4), explode=explode, labels=labels, colors=colors,
46-
autopct='%1.1f%%', shadow=True, startangle=90,
46+
autopct='%1.1f%%', shadow=True, startangle=90,
4747
radius=0.25, center=(1, 0), frame=True)
4848

4949
ax.set_xticks([0, 1])

examples/pylab_examples/anchored_artists.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from matplotlib.patches import Rectangle, Ellipse
22

33
from matplotlib.offsetbox import AnchoredOffsetbox, AuxTransformBox, VPacker,\
4-
TextArea, DrawingArea
4+
TextArea, DrawingArea
55

66

77
class AnchoredText(AnchoredOffsetbox):

examples/pylab_examples/annotation_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
horizontalalignment='left',
134134
verticalalignment='bottom',
135135
clip_on=True, # clip to the axes bounding box
136-
)
136+
)
137137

138138
ax.set_xlim(-20, 20)
139139
ax.set_ylim(-20, 20)

examples/pylab_examples/annotation_demo2.py

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@
7070
)
7171

7272
ann = ax.annotate('', xy=(4., 1.), xycoords='data',
73-
xytext=(4.5, -1), textcoords='data',
74-
arrowprops=dict(arrowstyle="<->",
75-
connectionstyle="bar",
76-
ec="k",
77-
shrinkA=5, shrinkB=5,
78-
)
79-
)
73+
xytext=(4.5, -1), textcoords='data',
74+
arrowprops=dict(arrowstyle="<->",
75+
connectionstyle="bar",
76+
ec="k",
77+
shrinkA=5, shrinkB=5,
78+
)
79+
)
8080

8181

8282
if 1:
@@ -126,28 +126,28 @@
126126
)
127127

128128
ann = ax.annotate('wedge', xy=(2., -1), xycoords='data',
129-
xytext=(0, -45), textcoords='offset points',
130-
size=20,
131-
bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec=(1., .5, .5)),
132-
arrowprops=dict(arrowstyle="wedge,tail_width=1.",
133-
fc=(1.0, 0.7, 0.7), ec=(1., .5, .5),
134-
patchA=None,
135-
patchB=el,
136-
relpos=(0.2, 0.8),
137-
connectionstyle="arc3,rad=-0.1"),
138-
)
129+
xytext=(0, -45), textcoords='offset points',
130+
size=20,
131+
bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec=(1., .5, .5)),
132+
arrowprops=dict(arrowstyle="wedge,tail_width=1.",
133+
fc=(1.0, 0.7, 0.7), ec=(1., .5, .5),
134+
patchA=None,
135+
patchB=el,
136+
relpos=(0.2, 0.8),
137+
connectionstyle="arc3,rad=-0.1"),
138+
)
139139

140140
ann = ax.annotate('wedge', xy=(2., -1), xycoords='data',
141-
xytext=(35, 0), textcoords='offset points',
142-
size=20, va="center",
143-
bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec="none"),
144-
arrowprops=dict(arrowstyle="wedge,tail_width=1.",
145-
fc=(1.0, 0.7, 0.7), ec="none",
146-
patchA=None,
147-
patchB=el,
148-
relpos=(0.2, 0.5),
149-
)
150-
)
141+
xytext=(35, 0), textcoords='offset points',
142+
size=20, va="center",
143+
bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec="none"),
144+
arrowprops=dict(arrowstyle="wedge,tail_width=1.",
145+
fc=(1.0, 0.7, 0.7), ec="none",
146+
patchA=None,
147+
patchB=el,
148+
relpos=(0.2, 0.5),
149+
)
150+
)
151151

152152

153153
show()

0 commit comments

Comments
 (0)
0