diff --git a/examples/Examples.ipynb b/examples/Examples.ipynb index 893e26a3..401a1e2e 100644 --- a/examples/Examples.ipynb +++ b/examples/Examples.ipynb @@ -178,7 +178,7 @@ "import matplotlib.pyplot as plt\n", "from skimage import img_as_ubyte \n", "\n", - "jet = matplotlib.cm.get_cmap('jet')\n", + "jet = matplotlib.colormaps.get_cmap('jet')\n", "\n", "np.random.seed(int(1)) # start random number generator\n", "n = int(5) # starting points\n", diff --git a/pythreejs/pythreejs.py b/pythreejs/pythreejs.py index 9119ea18..f2705748 100644 --- a/pythreejs/pythreejs.py +++ b/pythreejs/pythreejs.py @@ -231,7 +231,7 @@ def make_text(text, position=(0, 0, 0), height=1): def height_texture(z, colormap='viridis'): """Create a texture corresponding to the heights in z and the given colormap.""" - from matplotlib import cm + from matplotlib import colormaps as cm from skimage import img_as_ubyte colormap = cm.get_cmap(colormap)