Skip to content

Commit

Permalink
Fixed mpl colorbar arrows when clim None is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Mar 16, 2017
1 parent c1fdcde commit 19cfff5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions holoviews/plotting/mpl/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,11 +659,13 @@ def _norm_kwargs(self, element, ranges, opts, vdim):

# Check whether the colorbar should indicate clipping
el_min, el_max = element.range(vdim)
if el_min < opts['vmin'] and el_max > opts['vmax']:
vmin = -np.inf if opts['vmin'] is None else opts['vmin']
vmax = np.inf if opts['vmax'] is None else opts['vmax']
if el_min < vmin and el_max > vmax:
self._cbar_extend = 'both'
elif el_min < opts['vmin']:
elif el_min < vmin:
self._cbar_extend = 'min'
elif el_max > opts['vmax']:
elif el_max > vmax:
self._cbar_extend = 'max'

# Define special out-of-range colors on colormap
Expand Down

0 comments on commit 19cfff5

Please sign in to comment.