from plotnine import ggplot, geom_point, aes, labs, theme_bw
from plotnine.data import mtcars
Black & White
In [1]:
In [2]:
# Gallery, themes
(="wt", y="mpg", colour="factor(gear)"))
ggplot(mtcars, aes(x+ geom_point()
+ labs(
= "Fuel economy declines as weight increases",
title="(1973-74)",
subtitle="Data from the 1974 Motor Trend US magazine.",
caption="Weight (1000 lbs)",
x="Fuel economy (mpg)",
y="Gears"
colour
)+ theme_bw()
)