Skip to content

Commit 55043a0

Browse files
committed
doc: Remove jet from more examples.
1 parent 3a5f06f commit 55043a0

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

examples/pie_and_polar_charts/polar_bar_demo.py

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

1616
# Use custom colors and opacity
1717
for r, bar in zip(radii, bars):
18-
bar.set_facecolor(plt.cm.jet(r / 10.))
18+
bar.set_facecolor(plt.cm.viridis(r / 10.))
1919
bar.set_alpha(0.5)
2020

2121
plt.show()

examples/pylab_examples/figimage_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Z.shape = 100, 100
1414
Z[:, 50:] = 1.
1515

16-
im1 = plt.figimage(Z, xo=50, yo=0, cmap=cm.jet, origin='lower')
17-
im2 = plt.figimage(Z, xo=100, yo=100, alpha=.8, cmap=cm.jet, origin='lower')
16+
im1 = plt.figimage(Z, xo=50, yo=0, origin='lower')
17+
im2 = plt.figimage(Z, xo=100, yo=100, alpha=.8, origin='lower')
1818

1919
plt.show()

examples/pylab_examples/hist_colormapped.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
norm = colors.Normalize(fracs.min(), fracs.max())
1717

1818
for thisfrac, thispatch in zip(fracs, patches):
19-
color = cm.jet(norm(thisfrac))
19+
color = cm.viridis(norm(thisfrac))
2020
thispatch.set_facecolor(color)
2121

2222

examples/pylab_examples/image_origin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
lim = -2, 11, -2, 6
1616
plt.subplot(211, facecolor='g')
1717
plt.title('blue should be up')
18-
plt.imshow(x, origin='upper', interpolation=interp, cmap='jet')
18+
plt.imshow(x, origin='upper', interpolation=interp)
1919
#plt.axis(lim)
2020

2121
plt.subplot(212, facecolor='y')
2222
plt.title('blue should be down')
23-
plt.imshow(x, origin='lower', interpolation=interp, cmap='jet')
23+
plt.imshow(x, origin='lower', interpolation=interp)
2424
#plt.axis(lim)
2525
plt.show()

examples/pylab_examples/layer_images.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def func3(x, y):
3636

3737
Z2 = func3(X, Y)
3838

39-
im2 = plt.imshow(Z2, cmap=plt.cm.jet, alpha=.9, interpolation='bilinear',
39+
im2 = plt.imshow(Z2, cmap=plt.cm.viridis, alpha=.9, interpolation='bilinear',
4040
extent=extent)
4141

4242
plt.show()

examples/pylab_examples/leftventricle_bulleye.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
4646
data = np.array(data).ravel()
4747

4848
if cmap is None:
49-
cmap = plt.cm.jet
49+
cmap = plt.cm.viridis
5050

5151
if norm is None:
5252
norm = mpl.colors.Normalize(vmin=data.min(), vmax=data.max())
@@ -142,7 +142,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
142142

143143
# Set the colormap and norm to correspond to the data for which
144144
# the colorbar will be used.
145-
cmap = mpl.cm.jet
145+
cmap = mpl.cm.viridis
146146
norm = mpl.colors.Normalize(vmin=1, vmax=17)
147147

148148
# ColorbarBase derives from ScalarMappable and puts a colorbar

examples/pylab_examples/quadmesh_demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232

3333
ax = fig.add_subplot(122)
3434
# You can control the color of the masked region:
35-
#cmap = cm.jet
36-
#cmap.set_bad('r', 1.0)
37-
#ax.pcolormesh(Qx,Qz,Zm, cmap=cmap)
35+
# cmap = cm.RdBu
36+
# cmap.set_bad('y', 1.0)
37+
# ax.pcolormesh(Qx, Qz, Zm, cmap=cmap)
3838
# Or use the default, which is transparent:
3939
col = ax.pcolormesh(Qx, Qz, Zm, shading='gouraud')
4040
ax.set_title('With masked values')

examples/specialty_plots/advanced_hillshading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def shade_other_data():
5656
z2 = np.cos(x**2 + y**2) # Data to color
5757

5858
norm = Normalize(z2.min(), z2.max())
59-
cmap = plt.cm.jet
59+
cmap = plt.cm.RdBu
6060

6161
ls = LightSource(315, 45)
6262
rgb = ls.shade_rgb(cmap(norm(z2)), z1)

examples/user_interfaces/embedding_in_wx3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def init_plot_data(self):
7474
y = np.arange(100.0) * 2 * np.pi / 50.0
7575
self.x, self.y = np.meshgrid(x, y)
7676
z = np.sin(self.x) + np.cos(self.y)
77-
self.im = a.imshow(z, cmap=cm.jet) # , interpolation='nearest')
77+
self.im = a.imshow(z, cmap=cm.RdBu) # , interpolation='nearest')
7878

7979
zmax = np.amax(z) - ERR_TOL
8080
ymax_i, xmax_i = np.nonzero(z >= zmax)

0 commit comments

Comments
 (0)