☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Active tools not working with created toolbar

Community Supportbokeh
bkos
bkos

When creating the toolbar explicitly, setting an active tool on the toolbar doesn’t work, but only when setting it on the figure. Is this a bug? Thanks.

from bokeh.plotting import figure, show, output_notebook
from bokeh.models.tools import Toolbar, WheelZoomTool
output_notebook()

wheel_tool = WheelZoomTool()

# Active tools set here don't work
toolbar = Toolbar(tools=[wheel_tool], active_scroll=wheel_tool)
p = figure(toolbar=toolbar, tools='')
# This works fine
# toolbar = Toolbar(tools=[wheel_tool])
# p = figure(toolbar=toolbar, tools='', active_scroll=wheel_tool)
# This also works fine
# p = figure(tools=[wheel_tool], active_scroll=wheel_tool)

p.scatter([1, 2, 3], [1, 2, 3])

show(p)
⌁   Link to post
mateusz
mateusz

This looks like a bug. Setting toolbar and tools simultaneously doesn’t make sense and shouldn’t be allowed. figure(toolbar=toolbar) should take the toolbar verbatim.

⌁   Link to post

End of archived discussion · Replies are disabled