plotnine.theme_classic

theme_classic(base_size=11, base_family=None)

A classic-looking theme, with x & y axis lines and no gridlines

Parameters

base_size : int = 11

Base font size. All text sizes are a scaled versions of the base font size.

base_family : str = None

Base font family. If None, use plotnine.options.base_family.

Examples

from plotnine import ggplot, aes, labs, theme_classic, geom_point
from plotnine.data import mtcars

Classic

# Gallery, themes
(
    ggplot(mtcars, aes(x="wt", y="mpg", colour="factor(gear)"))
    + geom_point()
    + labs(
        title= "Fuel economy declines as weight increases",
        subtitle="(1973-74)",
        caption="Data from the 1974 Motor Trend US magazine.",
        x="Weight (1000 lbs)",
        y="Fuel economy (mpg)",
        colour="Gears"
    )
    + theme_classic()
)

Source: Classic