Skip to contents

Customize zooming behavior of roboplots.

Usage

set_zoom(zoom = getOption("roboplot.zoom"), ...)

Arguments

zoom

Characters. Controls how roboplots are zoomed in. Valid strings are "none", "scroll" (scrollwheel and two-finger drag) and "drag" (mouse or finger drag). Currently not used in robomaps. Default is "scroll".

...

Placeholder for future arguments.

Examples



# Zoom by dragging with mouse.
energiantuonti |>
  dplyr::filter(Alue == "Venäjä") |>
  roboplot(Suunta, zoom = "drag")
# Better for mobile to scroll with two fingers, or mobile on desktop. energiantuonti |> dplyr::filter(Alue == "Venäjä") |> roboplot(Suunta, zoom = "scroll")
# Note that modebar zooming is not affected by this setting. energiantuonti |> dplyr::filter(Alue == "Venäjä") |> roboplot(Suunta, zoom = "none", modebar = set_modebar(buttons = c("zoomin","zoomout","pan")))