Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2b119b6

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

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed

‎examples/pylab_examples/demo_bboximage.py

Copy file name to clipboardExpand all lines: examples/pylab_examples/demo_bboximage.py
+5-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.