Skip to content

Commit

Permalink
This seems to fix the issue of contourf colorbars not recognizing vmi…
Browse files Browse the repository at this point in the history
…n,vmax.
  • Loading branch information
lkilcher committed Sep 13, 2015
1 parent b9bc7d1 commit 8ad6f0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/matplotlib/colorbar.py
Expand Up @@ -886,11 +886,11 @@ def __init__(self, ax, mappable, **kw):
if isinstance(mappable, contour.ContourSet):
CS = mappable
kw['alpha'] = mappable.get_alpha()
kw['boundaries'] = CS._levels
kw['values'] = CS.cvalues
if not CS.filled:
kw['boundaries'] = CS._levels
kw['values'] = CS.cvalues
kw.setdefault('ticks', ticker.FixedLocator(CS.levels, nbins=10))
kw['extend'] = CS.extend
#kw['ticks'] = CS._levels
kw.setdefault('ticks', ticker.FixedLocator(CS.levels, nbins=10))
kw['filled'] = CS.filled
ColorbarBase.__init__(self, ax, **kw)
if not CS.filled:
Expand Down

4 comments on commit 8ad6f0e

@tacaswell
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am 👎 on this as it removes functionality and special cases a special case handling.

@lkilcher
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks again.

@tacaswell
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I came across as hostile or negative. Thank you for your work on this.

@lkilcher
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't interpret you as hostile, just busy. Thanks for all your work and timely responses!

Please sign in to comment.