Set default toolbar options for all plots

The below code will create a plot and change the toolbar so that it is below the graph, and will activate “wheel zoom” and “box zoom”. These are not default toolbar options.

Is there any way to set these options globally so that they apply to all plots in a session (in this case, an ipython notebook)? Something like: bokeh.default_active_scroll = “wheel_zoom”, so that I don’t have to set the options for each plot.

from bokeh.plotting import figure, show, output_notebook
output_notebook()
p = figure(plot_width=400, plot_height=400,
toolbar_sticky=False, toolbar_location=“below”,
active_scroll=“wheel_zoom”, active_drag=“box_zoom”, tools=“reset,wheel_zoom,box_zoom,save”)
p.circle([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], size=15)
show§

``

Hi,

Bokeh Themes can be used to specify new defaults for any model property, not just visual ones:

  http://bokeh.pydata.org/en/latest/docs/reference/themes.html

One example is here:
  
  https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/standalone_embed.py#L39-L50

Thanks,

Bryan

···

On Jun 28, 2017, at 14:52, [email protected] wrote:

The below code will create a plot and change the toolbar so that it is below the graph, and will activate "wheel zoom" and "box zoom". These are not default toolbar options.

Is there any way to set these options globally so that they apply to *all* plots in a session (in this case, an ipython notebook)? Something like: bokeh.default_active_scroll = "wheel_zoom", so that I don't have to set the options for each plot.

from bokeh.plotting import figure, show, output_notebook
output_notebook()
p = figure(plot_width=400, plot_height=400,
           toolbar_sticky=False, toolbar_location="below",
           active_scroll="wheel_zoom", active_drag="box_zoom", tools="reset,wheel_zoom,box_zoom,save")
p.circle([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], size=15)
show(p)

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/81209fe1-bf53-4367-8bc9-a2a146e01d7a%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.