Add "wheel_zoom" tool to a Bokeh figure

tool_wheel_zoom(fig, dimensions = "both")

Arguments

fig

figure to modify

dimensions

a vector specifying whether the wheel_zoom tool should zoom with respect to the x axis ("width") and the y axis ("height") or "both"

Note

Tools can be easily specified as a vector of tool names in the tools argument when instantiating a figure. In this case, they are added with defaults. Explicitly calling these tool_ functions will manually add the tool to a figure and allow additional specification of parameters.

See also

Examples

# \donttest{ # only zoom on x axis figure() %>% ly_points(1:10) %>% tool_wheel_zoom(dimensions = "height") # }