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 bb96d10 commit 42abbe4Copy full SHA for 42abbe4
torchgeo/datasets/mdas.py
@@ -11,7 +11,6 @@
11
import numpy as np
12
import rasterio as rio
13
import torch
14
-from matplotlib.colormaps import get_cmap
15
from matplotlib.colors import ListedColormap
16
from matplotlib.figure import Figure
17
from torch import Tensor
@@ -356,7 +355,7 @@ def plot(
356
355
axs[idx].imshow(img)
357
case 'osm_landuse_mask':
358
img = data.numpy().squeeze(0)
359
- cmap = ListedColormap([get_cmap('tab20')(i) for i in range(20)])
+ cmap = ListedColormap([plt.get_cmap('tab20')(i) for i in range(20)])
360
im = axs[idx].imshow(img, cmap=cmap)
361
cbar = plt.colorbar(im, ax=axs[idx], ticks=range(19))
362
cbar.ax.set_yticklabels(
0 commit comments