Style Plotly Plots
This guide demonstrates how to style Plotly plots using the Plotly pane. You can customize your plots with Plotly's built-in templates, available in plotly.io.templates
. For more details, refer to the Plotly Templates Guide.
The GIF below illustrates the possibilities when you style a Plotly plot with FastGridTemplate
.
Creating a Plotly Express Plot with a Custom Theme and Accent Color
In this example, you'll apply a dark theme and a custom accent color to a Plotly Express plot.
Styling a Plotly go.Figure
Plot with a Dark Theme
This example shows how to apply a dark theme to a Plotly go.Figure
plot.
Changing the Default Theme in Plotly Express
You can change the default Plotly Express template
based on the pn.config.theme
setting:
Changing Plotly Template Defaults
For example, you can set paper_bgcolor
and plot_bgcolor
to transparent: