Render a ggWebGL Widget in Shiny
Usage
renderGgWebGL(expr, env = parent.frame(), quoted = FALSE)Examples
server <- function(input, output, session) {
output$plot <- renderGgWebGL({
ggplot_webgl(
ggplot2::ggplot(
mtcars[1:8, ],
ggplot2::aes(mpg, wt, colour = factor(cyl))
) +
geom_point_webgl(size = 2) +
theme_webgl()
)
})
}
server
#> function (input, output, session)
#> {
#> output$plot <- renderGgWebGL({
#> ggplot_webgl(ggplot2::ggplot(mtcars[1:8, ], ggplot2::aes(mpg,
#> wt, colour = factor(cyl))) + geom_point_webgl(size = 2) +
#> theme_webgl())
#> })
#> }
#> <environment: 0x10d52bf70>