diff --git a/lib/cartopy/tests/mpl/test_images.py b/lib/cartopy/tests/mpl/test_images.py index b424708c31..d04972aa7c 100644 --- a/lib/cartopy/tests/mpl/test_images.py +++ b/lib/cartopy/tests/mpl/test_images.py @@ -9,7 +9,6 @@ import numpy as np import matplotlib.pyplot as plt -import matplotlib.cm as cm import matplotlib.colors as colors from PIL import Image import pytest @@ -143,7 +142,7 @@ def test_imshow_rgba(): # tests that the alpha of a RGBA array passed to imshow is set to 0 # instead of masked z = np.full((100, 100), 0.5) - cmap = cm.get_cmap() + cmap = plt.get_cmap() norm = colors.Normalize(vmin=0, vmax=1) z1 = cmap(norm(z)) plt_crs = ccrs.LambertAzimuthalEqualArea() diff --git a/lib/cartopy/tests/mpl/test_pseudo_color.py b/lib/cartopy/tests/mpl/test_pseudo_color.py index d4eb4abc34..da00681f99 100644 --- a/lib/cartopy/tests/mpl/test_pseudo_color.py +++ b/lib/cartopy/tests/mpl/test_pseudo_color.py @@ -92,7 +92,7 @@ def test_pcolormesh_datalim(): # Z with the same shape as X/Y to force the interpolation z = np.zeros(xs.shape) - ax = plt.subplot(2, 1, 1, projection=ccrs.PlateCarree()) + ax = plt.subplot(3, 1, 1, projection=ccrs.PlateCarree()) coll = ax.pcolormesh(xs, ys, z, shading='auto', transform=ccrs.PlateCarree()) @@ -104,7 +104,7 @@ def test_pcolormesh_datalim(): y = [-10, 10] xs, ys = np.meshgrid(x, y) - ax = plt.subplot(2, 1, 1, projection=ccrs.PlateCarree()) + ax = plt.subplot(3, 1, 2, projection=ccrs.PlateCarree()) coll = ax.pcolormesh(xs, ys, z, shading='auto', transform=ccrs.PlateCarree()) @@ -116,7 +116,7 @@ def test_pcolormesh_datalim(): y = [-10, 10] xs, ys = np.meshgrid(x, y) - ax = plt.subplot(2, 1, 1, projection=ccrs.Orthographic()) + ax = plt.subplot(3, 1, 3, projection=ccrs.Orthographic()) coll = ax.pcolormesh(xs, ys, z, shading='auto', transform=ccrs.PlateCarree())