geom2trace: Convert a "basic" geoms to a plotly.js trace.

View source: R/layers2traces.R

geom2traceR Documentation

Convert a "basic" geoms to a plotly.js trace.

Description

This function makes it possible to convert ggplot2 geoms that are not included with ggplot2 itself. Users shouldn't need to use this function. It exists purely to allow other package authors to write their own conversion method(s).

Usage

geom2trace(data, params, p)

Arguments

data

the data returned by plotly::to_basic.

params

parameters for the geom, statistic, and 'constant' aesthetics

p

a ggplot2 object (the conversion may depend on scales, for instance).


plotly documentation built on May 29, 2024, 2:23 a.m.