Experimental. Restyle a plotly plot with transparent backgrounds, tokenised fonts and gridlines, and the shadshiny categorical colorway. Requires plotly.
Arguments
- p
A plotly object.
- preset
A preset name or
shad_current_theme()list.- dark
If
TRUE, use dark-mode colors.
See also
Other shadshiny theming:
shad_chart_colors(),
shad_current_theme(),
shad_theme(),
shad_theme_echarts4r(),
shad_theme_from_registry(),
shad_theme_ggplot2(),
shad_theme_scope(),
shad_tokens()
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)
}