Skip to contents

Experimental. Restyle a plotly plot with transparent backgrounds, tokenised fonts and gridlines, and the shadshiny categorical colorway. Requires plotly.

Usage

shad_theme_plotly(p, preset = NULL, dark = FALSE)

Arguments

p

A plotly object.

preset

A preset name or shad_current_theme() list.

dark

If TRUE, use dark-mode colors.

Value

The modified plotly object.

Examples

if (requireNamespace("plotly", quietly = TRUE)) {
  p <- plotly::plot_ly(mtcars, x = ~wt, y = ~mpg,
                       type = "scatter", mode = "markers")
  p <- shad_theme_plotly(p, preset = "green", dark = TRUE)
}