Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b119b6

Browse files
authored
Merge pull request #8323 from QuLogic/cmap-deprecations
Skip more deprecated colormaps in example.
2 parents d2e813d + 9d1e456 commit 2b119b6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

examples/pylab_examples/demo_bboximage.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
a = np.linspace(0, 1, 256).reshape(1, -1)
2626
a = np.vstack((a, a))
2727

28-
maps = sorted(m for m in plt.cm.cmap_d if not m.endswith("_r"))
29-
maps.remove('spectral') # Deprecated.
30-
#nmaps = len(maps) + 1
28+
maps = sorted(
29+
m for m in plt.cm.cmap_d
30+
if not m.endswith("_r") and # Skip reversed colormaps.
31+
not m.startswith(('spectral', 'Vega')) # Skip deprecated colormaps.
32+
)
3133

3234
#fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99)
3335

0 commit comments

Comments
 (0)