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

Skip to content

Commit 8a810fa

Browse files
committed
style fixes
1 parent 9231c4c commit 8a810fa

12 files changed

Lines changed: 26 additions & 19 deletions

examples/mplot3d/contour3d_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
fig = plt.figure()
66
ax = fig.add_subplot(111, projection='3d')
77
X, Y, Z = axes3d.get_test_data(0.05)
8-
cset = ax.contour(X, Y, Z, cmap = cm.coolwarm)
8+
cset = ax.contour(X, Y, Z, cmap=cm.coolwarm)
99
ax.clabel(cset, fontsize=9, inline=1)
1010

1111
plt.show()

examples/mplot3d/contour3d_demo2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
fig = plt.figure()
66
ax = fig.gca(projection='3d')
77
X, Y, Z = axes3d.get_test_data(0.05)
8-
cset = ax.contour(X, Y, Z, extend3d=True, cmap = cm.coolwarm)
8+
cset = ax.contour(X, Y, Z, extend3d=True, cmap=cm.coolwarm)
99
ax.clabel(cset, fontsize=9, inline=1)
1010

1111
plt.show()

examples/mplot3d/contour3d_demo3.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
ax = fig.gca(projection='3d')
77
X, Y, Z = axes3d.get_test_data(0.05)
88
ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
9-
cset = ax.contour(X, Y, Z, zdir='z', offset=-100, cmap = cm.coolwarm)
10-
cset = ax.contour(X, Y, Z, zdir='x', offset=-40, cmap = cm.coolwarm)
11-
cset = ax.contour(X, Y, Z, zdir='y', offset=40, cmap = cm.coolwarm)
9+
cset = ax.contour(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
10+
cset = ax.contour(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
11+
cset = ax.contour(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm)
1212

1313
ax.set_xlabel('X')
1414
ax.set_xlim(-40, 40)

examples/mplot3d/contourf3d_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
fig = plt.figure()
66
ax = fig.gca(projection='3d')
77
X, Y, Z = axes3d.get_test_data(0.05)
8-
cset = ax.contourf(X, Y, Z, cmap = cm.coolwarm)
8+
cset = ax.contourf(X, Y, Z, cmap=cm.coolwarm)
99
ax.clabel(cset, fontsize=9, inline=1)
1010

1111
plt.show()

examples/mplot3d/contourf3d_demo2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
ax = fig.gca(projection='3d')
1212
X, Y, Z = axes3d.get_test_data(0.05)
1313
ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
14-
cset = ax.contourf(X, Y, Z, zdir='z', offset=-100, cmap = cm.coolwarm)
15-
cset = ax.contourf(X, Y, Z, zdir='x', offset=-40, cmap = cm.coolwarm)
16-
cset = ax.contourf(X, Y, Z, zdir='y', offset=40, cmap = cm.coolwarm)
14+
cset = ax.contourf(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
15+
cset = ax.contourf(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
16+
cset = ax.contourf(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm)
1717

1818
ax.set_xlabel('X')
1919
ax.set_xlim(-40, 40)

examples/pylab_examples/contourf_log.py

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

3131
# Automatic selection of levels works; setting the
3232
# log locator tells contourf to use a log scale:
33-
cs = P.contourf(X, Y, z, locator=ticker.LogLocator(), cmap = cm.PuBu_r)
33+
cs = P.contourf(X, Y, z, locator=ticker.LogLocator(), cmap=cm.PuBu_r)
3434

3535
# Alternatively, you can manually set the levels
3636
# and the norm:

examples/pylab_examples/griddata_demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
zi = griddata(x,y,z,xi,yi,interp='linear')
1717
# contour the gridded data, plotting dots at the nonuniform data points.
1818
CS = plt.contour(xi,yi,zi,15,linewidths=0.5,colors='k')
19-
CS = plt.contourf(xi,yi,zi,15,cmap=plt.cm.rainbow, vmax=abs(zi).max(), vmin=-abs(zi).max())
19+
CS = plt.contourf(xi,yi,zi,15,cmap=plt.cm.rainbow,
20+
vmax=abs(zi).max(), vmin=-abs(zi).max())
2021
plt.colorbar() # draw colorbar
2122
# plot data points.
2223
plt.scatter(x,y,marker='o',c='b',s=5,zorder=10)

examples/pylab_examples/hexbin_demo2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
gridsize=30
4040

4141
plt.subplot(211)
42-
plt.hexbin(x,y, C=z, gridsize=gridsize, marginals=True, cmap=plt.cm.RdBu, vmax=abs(z).max(), vmin=-abs(z).max())
42+
plt.hexbin(x,y, C=z, gridsize=gridsize, marginals=True, cmap=plt.cm.RdBu,
43+
vmax=abs(z).max(), vmin=-abs(z).max())
4344
plt.axis([xmin, xmax, ymin, ymax])
4445
cb = plt.colorbar()
4546
cb.set_label('mean value')

examples/pylab_examples/poormans_contour.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020

2121
cmap = cm.get_cmap('PiYG', 11) # 11 discrete colors
2222

23-
im = imshow(Z, cmap=cmap, interpolation='bilinear', vmax=abs(Z).max(), vmin=-abs(Z).max())
23+
im = imshow(Z, cmap=cmap, interpolation='bilinear',
24+
vmax=abs(Z).max(), vmin=-abs(Z).max())
2425
axis('off')
2526
colorbar()
2627

examples/pylab_examples/specgram_demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@
2525
ax1 = subplot(211)
2626
plot(t, x)
2727
subplot(212, sharex=ax1)
28-
Pxx, freqs, bins, im = specgram(x, NFFT=NFFT, Fs=Fs, noverlap=900, cmap=cm.gist_heat)
28+
Pxx, freqs, bins, im = specgram(x, NFFT=NFFT, Fs=Fs, noverlap=900,
29+
cmap=cm.gist_heat)
2930
show()

0 commit comments

Comments
 (0)