Skip to content

Commit

Permalink
Merge pull request #1152 from ioam/allow_no_dim_cbar
Browse files Browse the repository at this point in the history
Fixed issue with no colorbar dimension and unicode label
  • Loading branch information
jlstevens committed Feb 28, 2017
2 parents 3aa315f + 03341f7 commit 96c36df
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions holoviews/plotting/mpl/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,12 @@ def _draw_colorbar(self, dim=None, redraw=True):

# Get colorbar label
dim = element.get_dimension(dim)
if dim is None:
dim = element.vdims[0]
label = str(dim)
if dim:
label = dim.pprint_label
elif element.vdims:
label = element.vdims[0].pprint_label
elif dim is None:
label = ''

padding = self.cbar_padding
width = self.cbar_width
Expand Down

0 comments on commit 96c36df

Please sign in to comment.