Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore Bokeh UserWarning for multiple active properties in toolbar #5873

Merged
merged 6 commits into from
Sep 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions holoviews/plotting/bokeh/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,13 +586,13 @@ def initialize_plot(self, ranges=None, plots=[]):
passed_plots.append(None)

plot = gridplot(plots[::-1],
merge_tools=self.merge_tools,
merge_tools=False,
sizing_mode=self.sizing_mode,
toolbar_location=self.toolbar)
if self.sync_legends:
sync_legends(plot)
plot = self._make_axes(plot)
if bokeh3 and hasattr(plot, "toolbar"):
if bokeh3 and hasattr(plot, "toolbar") and self.merge_tools:
philippjfr marked this conversation as resolved.
Show resolved Hide resolved
plot.toolbar = merge_tools(plots)

title = self._get_title_div(self.keys[-1])
Expand Down Expand Up @@ -644,7 +644,9 @@ def _make_axes(self, plot):
if self.shared_yaxis:
x_axis.margin = (0, 0, 0, 50)
r1, r2 = r1[::-1], r2[::-1]
plot = gridplot([r1, r2])
plot = gridplot([r1, r2], merge_tools=False)
if bokeh3 and self.merge_tools:
plot.toolbar = merge_tools([r1, r2])
elif y_axis:
models = [y_axis, plot]
if self.shared_yaxis: models = models[::-1]
Expand Down Expand Up @@ -947,10 +949,10 @@ def initialize_plot(self, plots=None, ranges=None):
else:
children = [subplots] if nsubplots == 2 else [[subplots[2], None], subplots[:2]]
grid = gridplot(children,
merge_tools=self.merge_tools,
merge_tools=False,
toolbar_location=self.toolbar,
sizing_mode=sizing_mode)
if bokeh3:
if bokeh3 and self.merge_tools:
grid.toolbar = merge_tools(children)
tab_plots.append((title, grid))
continue
Expand Down Expand Up @@ -987,12 +989,12 @@ def initialize_plot(self, plots=None, ranges=None):
layout_plot = gridplot(
children=plot_grid,
toolbar_location=self.toolbar,
merge_tools=self.merge_tools,
merge_tools=False,
sizing_mode=sizing_mode
)
if self.sync_legends:
sync_legends(layout_plot)
if bokeh3:
if bokeh3 and self.merge_tools:
layout_plot.toolbar = merge_tools(plot_grid)

title = self._get_title_div(self.keys[-1])
Expand Down