The simple_white Template
Why this course uses a specific Plotly template — and how to pick a different one if you need to
You've seen the same argument appear in every chart on every page of this course:
template="simple_white"Now is a good time to stop and explain why — and to introduce the larger idea of Plotly templates.
What is a template?
A Plotly template is a named bundle of default styling: the
background color, the gridlines, the fonts, the default color
palette, the axis style, the legend position, and so on. You pick
one with the template= argument, and every chart you make with
that template inherits its visual identity.
Templates are purely cosmetic. They do not change which data is plotted, which encodings you use, or any analytical content. They only change how the chart looks.
The built-in templates
Plotly ships with about a dozen named templates. The main ones are:
| Template | Look |
|---|---|
plotly | The default — gray background, dotted gridlines |
plotly_white | White background, blue/orange palette |
plotly_dark | Dark background — good for dashboards |
simple_white | Pure white, very minimal — this course's default |
ggplot2 | Mimics R's ggplot2 theme |
seaborn | Mimics Python's Seaborn defaults |
none | No styling at all |
presentation | Larger fonts, suitable for slides |
gridon | Like plotly but with extra grid |
xgridoff | Disables vertical gridlines |
ygridoff | Disables horizontal gridlines |
You can see them in action by changing the template= argument.
Edit the code and try "plotly", "plotly_dark", "ggplot2",
"presentation", etc.
Why this course uses simple_white
Why simple_white?
This course uses template="simple_white" for every Plotly chart
because:
- It removes visual noise. No gray background, no heavy gridlines competing with the data.
- The data is the loudest thing on the page. That matches the central message of this course: charts are for the data.
- It prints well. Light background, dark ink — readable on paper, in slides, and on both light and dark documentation themes.
- It looks professional out of the box. No fiddling needed before sharing with a colleague.
Other templates are completely valid — plotly_dark is great
for dashboards, presentation is great for slide decks,
ggplot2 is loved by statisticians. We use simple_white here for
consistency and clarity, not because it is "best."
Setting a template globally
If you don't want to type template="simple_white" every time, you
can set it as the default for an entire session:
import plotly.io as pio
pio.templates.default = "simple_white"After that, every chart you make will use simple_white unless you
override it. Try it:
In a notebook or a script, set the default once near your imports and then forget about it.
What a template doesn't fix
Templates only handle style. They don't:
- Choose the right chart type for your data.
- Sort your bars in a sensible order.
- Add a meaningful title or axis labels.
- Decide which encodings best convey your story.
A bad chart in simple_white is still a bad chart. A good chart
in any template still communicates the story.
Composing your own template (optional, advanced)
You can also create partial templates — small overrides on top of an existing one. For example, change the default font:
import plotly.io as pio
pio.templates["my_clean"] = pio.templates["simple_white"]
pio.templates["my_clean"].layout.font.family = "Helvetica, Arial, sans-serif"
pio.templates.default = "my_clean"This is rarely necessary for individual analysis work, but it's how teams enforce a consistent brand look across many notebooks and dashboards.
Check your understanding
What does a Plotly template control?
The numeric data plotted.
Which chart type is used.
The visual styling: background, gridlines, default colors, fonts, and other purely cosmetic settings.
Whether the chart is interactive.
Why does this course pick template="simple_white" as the default?
It is the only template that supports interactive charts.
It is required by Plotly Express.
It removes visual noise (no gray background, minimal gridlines), letting the data stand out — and it prints / renders cleanly on most surfaces.
simple_white makes charts render faster.
How can you set simple_white as the default template for an entire session, so you don't have to type template="simple_white" on every chart?
Pass default=True to your first chart.
Rename the package.
Set plotly.io.templates.default = "simple_white" once near your imports.
Edit the Plotly source code.