clean_ggplotly: Clean version of ggplotly

View source: R/fct_clean_ggplotly.R

clean_ggplotlyR Documentation

Clean version of ggplotly

Description

Clean version of ggplotly

Usage

clean_ggplotly(
  p = ggplot2::last_plot(),
  width = NULL,
  height = NULL,
  tooltip = "all",
  dynamic_ticks = FALSE,
  layer_data = 1,
  original_data = TRUE,
  source = "A",
  ...
)

Arguments

p

a ggplot object.

width

Width of the plot in pixels (optional, defaults to automatic sizing).

height

Height of the plot in pixels (optional, defaults to automatic sizing).

tooltip

a character vector specifying which aesthetic mappings to show in the tooltip. The default, "all", means show all the aesthetic mappings (including the unofficial "text" aesthetic). The order of variables here will also control the order they appear. For example, use tooltip = c("y", "x", "colour") if you want y first, x second, and colour last.

dynamic_ticks

should plotly.js dynamically generate axis tick labels? Dynamic ticks are useful for updating ticks in response to zoom/pan interactions; however, they can not always reproduce labels as they would appear in the static ggplot2 image.

layer_data

data from which layer should be returned?

original_data

should the "original" or "scaled" data be returned?

source

a character string of length 1. Match the value of this string with the source argument in event_data() to retrieve the event data corresponding to a specific plot (shiny apps can have multiple plots).

...

arguments passed onto methods.


UBESP-DCTV/covid19ita documentation built on May 15, 2024, 10:40 a.m.