8000 Generate reversed ListedColormaps by cgohlke · Pull Request #5092 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Generate reversed ListedColormaps #5092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 17, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove unneeded list comprehension
  • Loading branch information
cgohlke committed Sep 17, 2015
commit f3e0bfb923978af50d099c903099392d14e7816c
3 changes: 1 addition & 2 deletions lib/matplotlib/_cm_listed.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,5 +1038,4 @@
cmaps[name] = ListedColormap(data, name=name)
# generate reversed colormap
name = name + '_r'
data = [rgb for rgb in reversed(data)]
cmaps[name] = ListedColormap(data, name=name)
cmaps[name] = ListedColormap(list(reversed(data)), name=name)
0