Shortcut for removing the options on the top of a plotly plot.
clear_plotly_options(plotly_object, buttons_to_keep = NULL, keep_logo = FALSE)
plotly_object | A plotly object. |
---|---|
buttons_to_keep | A string. Default is
|
keep_logo | A logical. Default is |
A plotly object.
if (FALSE) { # remove all options p %>% clear_plotly_options() # keep Download plot as a png button p %>% clear_plotly_options(buttons_to_keep = "toImage") # keep zoom in and zoom out buttons p %>% clear_plotly_options(buttons_to_keep = c("zoomIn2d", "zoomOut2d")) }