to_basic.GeomShape: Support plotly for GeomShape

to_basic.GeomShapeR Documentation

Support plotly for GeomShape

Description

Support plotly for GeomShape

Usage

## S3 method for class 'GeomShape'
to_basic(data, prestats_data, layout, params, p, ...)

Arguments

data

the data returned by ggplot2::ggplot_build().

prestats_data

the data before statistics are computed.

layout

the panel layout.

params

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

p

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

...

currently ignored

Details

This function is a helper function intended to provide a simple but not fully-equivalent link between ggforce::geom_shape() and plotly::ggplotly(). This function converts data to ggplot2::geom_polygon which is sufficient for the splicejam package, but which does not provide the extra effects from ggforce::geom_shape() such as rounded corners or resizing. This function may be extended then submitted to the ggforce package to assist plotly support.

This function is exported, since otherwise it caused problems when invoking plotly::ggplotly() and this function was not consistently used in that process for some reason.

Currently only data is passed to ggplot2::GeomPolygon.

See Also

Other jam ggplot2 functions: gene2gg(), geom_diagonal_wide_arc(), plotSashimi(), splicejam-extensions


jmw86069/splicejam documentation built on Nov. 4, 2024, 10:53 a.m.