gg2list: Convert a ggplot to a list.

Description Usage Arguments Value

View source: R/ggplotly.R

Description

Convert a ggplot to a list.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
gg2list(
  p,
  width = NULL,
  height = NULL,
  tooltip = "all",
  dynamicTicks = FALSE,
  layerData = 1,
  originalData = TRUE,
  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).

dynamicTicks

accepts the following values: FALSE, TRUE, "x", or "y". Dynamic ticks are useful for updating ticks in response to zoom/pan/filter interactions; however, there is no guarantee they reproduce axis tick text as they would appear in the static ggplot2 image.

layerData

data from which layer should be returned?

originalData

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).

...

currently not used

Value

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


plotly documentation built on Feb. 13, 2020, 1:07 a.m.