diff --git a/docs/examples/snow-detection/snow-mode.py b/docs/examples/snow-detection/snow-mode.py
index 3df031d1..1b732885 100644
--- a/docs/examples/snow-detection/snow-mode.py
+++ b/docs/examples/snow-detection/snow-mode.py
@@ -52,7 +52,6 @@
 import numpy as np
 import re
 import pvlib
-from matplotlib import colormaps as cm
 import matplotlib.pyplot as plt
 from matplotlib.dates import DateFormatter
 import matplotlib.patches as mpatches
@@ -600,7 +599,7 @@ def wrapper(voltage, current, temp_cell, effective_irradiance,
 
 N = 6
 alpha = 0.5
-cmap = cm.get_cmap('plasma').resampled(N)
+cmap = plt.get_cmap('plasma', N)
 
 loss_cols = [c for c in data.columns if "Loss" in c]
 mode_cols = [c for c in data.columns if "mode" in c and "modeled" not in c]
@@ -660,8 +659,6 @@ def wrapper(voltage, current, temp_cell, effective_irradiance,
     my_patch = mpatches.Patch(color=cmap.colors[i], label=f'Mode {i}')
     handles.append(my_patch)
 
-# handles.append(gray_patch)
-
 ax.set_xlabel('Date', fontsize='xx-large')
 ax.set_ylabel('DC Power [W]', fontsize='xx-large')
 ax.legend(handles=handles, fontsize='xx-large', loc='upper left')