tool_box_zoom {rbokeh} | R Documentation |
Add "box_zoom" tool to a Bokeh figure
tool_box_zoom(fig, dimensions = NULL, match_aspect = FALSE, line_color = NULL, line_alpha = NULL, fill_color = NULL, fill_alpha = NULL, line_width = NULL, line_dash = NULL, line_dash_offset = NULL, line_join = NULL, line_cap = NULL, remove = FALSE)
fig |
Figure to modify. |
dimensions |
Which dimensions the zoom box is to be free in. By default, users may freely draw zoom boxes with any dimensions. If only "width" is supplied, the box will be constrained to span the entire vertical space of the plot, only the horizontal dimension can be controlled. If only "height" is supplied, the box will be constrained to span the entire horizontal space of the plot, and the vertical dimension can be controlled. One of 'width', 'height', or 'both'. |
match_aspect |
Whether the box zoom region should be restricted to have the same aspect ratio as the plot region. Note: If the tool is restricted to one dimension, this value has no effect. |
line_color |
The line color values for the box. |
line_alpha |
The line alpha values for the box. |
fill_color |
The fill color values for the box. |
fill_alpha |
The fill alpha values for the box. |
line_width |
The line width values for the box. |
line_dash |
The line dash values for the box. |
line_dash_offset |
The line dash offset values for the box. |
line_join |
The line join values for the box. |
line_cap |
The line cap values for the box. |
remove |
Logical indicating whether the tool should be removed. |
Other tools: tool_box_select
,
tool_crosshair
, tool_help
,
tool_lasso_select
, tool_pan
,
tool_poly_select
, tool_redo
,
tool_reset
, tool_save
,
tool_undo
, tool_wheel_pan
,
tool_wheel_zoom
,
tool_zoom_in
, tool_zoom_out
figure(tools = "reset") %>% ly_points(1:10) %>% tool_box_zoom(line_color = "red", match_aspect = TRUE)