plotly (version 3.6.0)

gg2list: Convert a ggplot to a list.

Description

Convert a ggplot to a list.

Usage

gg2list(p, width = NULL, height = NULL, tooltip = "all", source = "A",
  ...)

Arguments

p

ggplot2 plot.

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 tooltips to show in the tooltip. The default, "all", means show all the aesthetic tooltips (including the unofficial "text" aesthetic).

source

Only relevant for event_data.

...

currently not used

Value

a 'built' plotly object (list with names "data" and "layout").