Skip to content

Commit

Permalink
Try again
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Jan 28, 2025
1 parent bb96d10 commit 42abbe4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions torchgeo/datasets/mdas.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import numpy as np
import rasterio as rio
import torch
from matplotlib.colormaps import get_cmap
from matplotlib.colors import ListedColormap
from matplotlib.figure import Figure
from torch import Tensor
Expand Down Expand Up @@ -356,7 +355,7 @@ def plot(
axs[idx].imshow(img)
case 'osm_landuse_mask':
img = data.numpy().squeeze(0)
cmap = ListedColormap([get_cmap('tab20')(i) for i in range(20)])
cmap = ListedColormap([plt.get_cmap('tab20')(i) for i in range(20)])
im = axs[idx].imshow(img, cmap=cmap)
cbar = plt.colorbar(im, ax=axs[idx], ticks=range(19))
cbar.ax.set_yticklabels(
Expand Down

0 comments on commit 42abbe4

Please sign in to comment.