Skip to content

Commit

Permalink
If xlabel/ylabel, then set axis_label (#3387)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 authored and philippjfr committed Jan 14, 2019
1 parent fe9f779 commit 57be5aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions holoviews/plotting/bokeh/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ def _init_plot(self, key, element, plots, ranges=None):
xlabel, ylabel, _ = labels
x_axis_type, y_axis_type = axis_types
properties = dict(plot_ranges)
properties['x_axis_label'] = xlabel if 'x' in self.labelled else ' '
properties['y_axis_label'] = ylabel if 'y' in self.labelled else ' '
properties['x_axis_label'] = xlabel if 'x' in self.labelled or self.xlabel else ' '
properties['y_axis_label'] = ylabel if 'y' in self.labelled or self.ylabel else ' '

if not self.show_frame:
properties['outline_line_alpha'] = 0
Expand Down Expand Up @@ -587,8 +587,8 @@ def _update_plot(self, key, plot, element=None):
xlabel, ylabel, zlabel = self._get_axis_labels(dimensions)
if self.invert_axes:
xlabel, ylabel = ylabel, xlabel
props['x']['axis_label'] = xlabel if 'x' in self.labelled else ''
props['y']['axis_label'] = ylabel if 'y' in self.labelled else ''
props['x']['axis_label'] = xlabel if 'x' in self.labelled or self.xlabel else ''
props['y']['axis_label'] = ylabel if 'y' in self.labelled or self.ylabel else ''
recursive_model_update(plot.xaxis[0], props.get('x', {}))
recursive_model_update(plot.yaxis[0], props.get('y', {}))

Expand Down

0 comments on commit 57be5aa

Please sign in to comment.