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

Skip to content

Commit ef29b87

Browse files
committed
PEP8 : sundry PEP8 fixes in the examples
1 parent 74b4313 commit ef29b87

File tree

6 files changed

+26
-24
lines changed

6 files changed

+26
-24
lines changed

examples/animation/strip_chart_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import matplotlib.animation as animation
99

1010

11-
class Scope(object)
11+
class Scope(object):
1212
def __init__(self, ax, maxt=2, dt=0.02):
1313
self.ax = ax
1414
self.dt = dt

examples/axes_grid/demo_axes_grid2.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ def add_inner_title(ax, title, loc, size=None, **kwargs):
3737
grid = ImageGrid(F, 211, # similar to subplot(111)
3838
nrows_ncols=(1, 3),
3939
direction="row",
40-
axes_pad = 0.05,
40+
axes_pad=0.05,
4141
add_all=True,
42-
label_mode = "1",
43-
share_all = True,
42+
label_mode="1",
43+
share_all=True,
4444
cbar_location="top",
4545
cbar_mode="each",
4646
cbar_size="7%",
@@ -75,10 +75,10 @@ def add_inner_title(ax, title, loc, size=None, **kwargs):
7575
grid2 = ImageGrid(F, 212,
7676
nrows_ncols=(1, 3),
7777
direction="row",
78-
axes_pad = 0.05,
78+
axes_pad=0.05,
7979
add_all=True,
80-
label_mode = "1",
81-
share_all = True,
80+
label_mode="1",
81+
share_all=True,
8282
cbar_location="right",
8383
cbar_mode="single",
8484
cbar_size="10%",

examples/axes_grid/demo_edge_colorbar.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ def demo_bottom_cbar(fig):
1717
"""
1818
grid = AxesGrid(fig, 121, # similar to subplot(132)
1919
nrows_ncols=(2, 2),
20-
axes_pad = 0.10,
20+
axes_pad=0.10,
2121
share_all=True,
22-
label_mode = "1",
23-
cbar_location = "bottom",
22+
label_mode="1",
23+
cbar_location="bottom",
2424
cbar_mode="edge",
25-
cbar_pad = 0.25,
26-
cbar_size = "15%",
25+
cbar_pad=0.25,
26+
cbar_size="15%",
2727
direction="column"
2828
)
2929

@@ -51,9 +51,9 @@ def demo_right_cbar(fig):
5151

5252
grid = AxesGrid(F, 122, # similar to subplot(122)
5353
nrows_ncols=(2, 2),
54-
axes_pad = 0.10,
55-
label_mode = "1",
56-
share_all = True,
54+
axes_pad=0.10,
55+
label_mode="1",
56+
share_all=True,
5757
cbar_location="right",
5858
cbar_mode="edge",
5959
cbar_size="7%",

examples/event_handling/lasso_demo.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def __init__(self, ax, data):
4343
self.collection = RegularPolyCollection(
4444
fig.dpi, 6, sizes=(100,),
4545
facecolors=facecolors,
46-
offsets = self.xys,
47-
transOffset = ax.transData)
46+
offsets=self.xys,
47+
transOffset=ax.transData)
4848

4949
ax.add_collection(self.collection)
5050

@@ -69,7 +69,9 @@ def onpress(self, event):
6969
return
7070
if event.inaxes is None:
7171
return
72-
self.lasso = Lasso(event.inaxes, (event.xdata, event.ydata), self.callback)
72+
self.lasso = Lasso(event.inaxes,
73+
(event.xdata, event.ydata),
74+
self.callback)
7375
# acquire a lock on the widget drawing
7476
self.canvas.widgetlock(self.lasso)
7577

examples/pylab_examples/contourf_demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777

7878
CS4 = plt.contour(X, Y, Z, levels,
7979
colors=('k',),
80-
linewidths = (3,),
81-
origin = origin)
80+
linewidths=(3,),
81+
origin=origin)
8282
plt.title('Listed colors (3 masked regions)')
8383
plt.clabel(CS4, fmt='%2.1f', colors='w', fontsize=14)
8484

@@ -95,7 +95,7 @@
9595
# instead of using the "bad" colormap value for them, it draws
9696
# nothing at all in them. Therefore the following would have
9797
# no effect:
98-
#cmap.set_bad("red")
98+
# cmap.set_bad("red")
9999

100100
fig, axs = plt.subplots(2, 2)
101101
for ax, extend in zip(axs.ravel(), extends):

examples/tests/backend_driver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,9 @@ def report_all_missing(directories):
342342

343343
failbackend = dict(
344344
svg=('tex_demo.py', ),
345-
agg = ('hyperlinks.py', ),
346-
pdf = ('hyperlinks.py', ),
347-
ps = ('hyperlinks.py', ),
345+
agg=('hyperlinks.py', ),
346+
pdf=('hyperlinks.py', ),
347+
ps=('hyperlinks.py', ),
348348
)
349349

350350

0 commit comments

Comments
 (0)