Back to Seaborn

Objects.Plot.Theme

doc/_docstrings/objects.Plot.theme.ipynb

0.13.2740 B
Original Source
python
import seaborn.objects as so
from seaborn import load_dataset
anscombe = load_dataset("anscombe")
python
p = (
    so.Plot(anscombe, "x", "y", color="dataset")
    .facet("dataset", wrap=2)
    .add(so.Line(), so.PolyFit(order=1))
    .add(so.Dot())
)
p
python
p.theme({"axes.facecolor": "w", "axes.edgecolor": "slategray"})
python
p.theme({"lines.linewidth": 4})
python
from seaborn import axes_style
p.theme(axes_style("ticks"))
python
from matplotlib import style
p.theme(style.library["fivethirtyeight"])
python
from seaborn import plotting_context
p.theme(axes_style("whitegrid") | plotting_context("talk"))
python
so.Plot.config.theme.update(axes_style("white"))
p