diff --git a/examples/pylab_examples/demo_bboximage.py b/examples/pylab_examples/demo_bboximage.py index 0063da828c9d..4ea47b6a4648 100644 --- a/examples/pylab_examples/demo_bboximage.py +++ b/examples/pylab_examples/demo_bboximage.py @@ -25,9 +25,11 @@ a = np.linspace(0, 1, 256).reshape(1, -1) a = np.vstack((a, a)) - maps = sorted(m for m in plt.cm.cmap_d if not m.endswith("_r")) - maps.remove('spectral') # Deprecated. - #nmaps = len(maps) + 1 + maps = sorted( + m for m in plt.cm.cmap_d + if not m.endswith("_r") and # Skip reversed colormaps. + not m.startswith(('spectral', 'Vega')) # Skip deprecated colormaps. + ) #fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99)