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

Skip to content

Commit 1c61e5a

Browse files
committed
Cleanup multi_image example.
The example has some issues pointed out elsewhere, but we can make it less a pain to investigate with small cleanups: - Don't use a weird/nonstandard colormap. - Don't scale the data to 1e-6 (which makes editing the values via the Qt figure options slightly a pain).
1 parent ab2d200 commit 1c61e5a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/images_contours_and_fields/multi_image.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
np.random.seed(19680801)
1414
Nr = 3
1515
Nc = 2
16-
cmap = "cool"
1716

1817
fig, axs = plt.subplots(Nr, Nc)
1918
fig.suptitle('Multiple images')
@@ -22,8 +21,8 @@
2221
for i in range(Nr):
2322
for j in range(Nc):
2423
# Generate data with a range that varies from one plot to the next.
25-
data = ((1 + i + j) / 10) * np.random.rand(10, 20) * 1e-6
26-
images.append(axs[i, j].imshow(data, cmap=cmap))
24+
data = ((1 + i + j) / 10) * np.random.rand(10, 20)
25+
images.append(axs[i, j].imshow(data))
2726
axs[i, j].label_outer()
2827

2928
# Find the min and max of all colors for use in setting the color scale.

0 commit comments

Comments
 (0)