8000 svg engine broken: fails with default tick labels on colorbar by mdboom · Pull Request #540 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

svg engine broken: fails with default tick labels on colorbar #540

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
Dec 31, 2011
Merged
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
5 changes: 5 additions & 0 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1682,6 +1682,8 @@ def colormaps():
def colorbar(mappable=None, cax=None, ax=None, **kw):
if mappable is None:
mappable = gci()
if mappable is None:
raise RuntimeError('You must first define an image, eg with imshow')
if ax is None:
ax = gca()

Expand Down Expand Up @@ -1732,6 +1734,9 @@ 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
0