We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6df99e commit 494fa5cCopy full SHA for 494fa5c
src/emsarray/transect.py
@@ -11,7 +11,7 @@
11
import shapely
12
import xarray
13
from cartopy import crs
14
-from matplotlib import animation, cm, pyplot
+from matplotlib import animation, colormaps, pyplot
15
from matplotlib.artist import Artist
16
from matplotlib.axes import Axes
17
from matplotlib.collections import PolyCollection
@@ -760,7 +760,7 @@ def _plot_on_figure(
760
if title is not None:
761
axes.set_title(title)
762
763
- cmap = cm.get_cmap(cmap).copy()
+ cmap = colormaps[cmap].copy()
764
cmap.set_bad(ocean_floor_colour)
765
collection = self.make_poly_collection(
766
cmap=cmap, clim=(numpy.nanmin(data_array), numpy.nanmax(data_array)))
0 commit comments