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

Skip to content

set_cmap should not require an active image #1515

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 1 commit into from
Nov 26, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2012-11-16 plt.set_cmap no longer throws errors if there is not already
an active colorable artist, such as an image, and just sets
up the colormap to use from that point forward. - PI

2012-11-13 Add a symmetric log normalization class to colors.py.
Also added some tests for the normalization class.
Till Stensitzki
Expand Down
2 changes: 0 additions & 2 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2027,8 +2027,6 @@ def set_cmap(cmap):

if im is not None:
im.set_cmap(cmap)
else:
raise RuntimeError('You must first define an image, eg with imshow')

draw_if_interactive()

Expand Down