diff --git a/holoviews/plotting/bokeh/plot.py b/holoviews/plotting/bokeh/plot.py index ae510c2fb0..59c78d741b 100644 --- a/holoviews/plotting/bokeh/plot.py +++ b/holoviews/plotting/bokeh/plot.py @@ -336,6 +336,9 @@ class GridPlot(CompositePlot, GenericCompositePlot): {'title': '15pt'}""") + merge_tools = param.Boolean(default=True, doc=""" + Whether to merge all the tools into a single toolbar""") + shared_xaxis = param.Boolean(default=False, doc=""" If enabled the x-axes of the GridSpace will be drawn from the objects inside the Grid rather than the GridSpace dimensions.""") @@ -344,6 +347,13 @@ class GridPlot(CompositePlot, GenericCompositePlot): If enabled the x-axes of the GridSpace will be drawn from the objects inside the Grid rather than the GridSpace dimensions.""") + toolbar = param.ObjectSelector(default='above', + objects=["above", "below", + "left", "right", None], + doc=""" + The toolbar location, must be one of 'above', 'below', + 'left', 'right', None.""") + xaxis = param.ObjectSelector(default=True, objects=['bottom', 'top', None, True, False], doc=""" Whether and where to display the xaxis, supported options are @@ -461,7 +471,8 @@ def initialize_plot(self, ranges=None, plots=[]): else: passed_plots.append(None) - plot = gridplot(plots[::-1]) + plot = gridplot(plots[::-1], toolbar_position=self.toolbar, + merge_tools=self.merge_tools) plot = self._make_axes(plot) title = self._get_title(self.keys[-1]) @@ -548,9 +559,19 @@ class LayoutPlot(CompositePlot, GenericLayoutPlot): share their Bokeh data source allowing for linked brushing and other linked behaviors.""") + merge_tools = param.Boolean(default=True, doc=""" + Whether to merge all the tools into a single toolbar""") + tabs = param.Boolean(default=False, doc=""" Whether to display overlaid plots in separate panes""") + toolbar = param.ObjectSelector(default='above', + objects=["above", "below", + "left", "right", None], + doc=""" + The toolbar location, must be one of 'above', 'below', + 'left', 'right', None.""") + def __init__(self, layout, keys=None, **params): super(LayoutPlot, self).__init__(layout, keys=keys, **params) self.layout, self.subplots, self.paths = self._init_layout(layout) @@ -756,7 +777,9 @@ def initialize_plot(self, plots=None, ranges=None): else: plots = filter_toolboxes(plots) plots, width = pad_plots(plots) - layout_plot = gridplot(children=plots, width=width, **kwargs) + layout_plot = gridplot(children=plots, width=width, + toolbar_position=self.toolbar, + merge_tools=self.merge_tools, **kwargs) title = self._get_title(self.keys[-1]) if title: