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

Skip to content

Commit 9d1e456

Browse files
committed
Skip more deprecated colormaps in example.
These colormaps were deprecated with 2.0.1 (and never supposed to be in 2.0.0 in the first place.) Using them causes (non-fatal) warnings when building documentation.
1 parent 415d39a commit 9d1e456

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)