Before I was using scale_color_cmap_d to assign each line a color from a cmap, when working with discrete groups. After update this code now throws:
AttributeError: 'scale_color_cmap_d' object has no attribute '_aesthetics'
import plotnine as p9
from plotnine.data import meat
meat_long = meat.melt(
id_vars="date",
value_vars=["beef", "veal", "pork", "lamb_and_mutton", "broilers", "turkey"],
var_name="animal",
value_name="weight"
).dropna()
(
p9.ggplot(meat_long, p9.aes(x="date", y="weight", color="animal"))
+ p9.geom_line(show_legend=False)
+ p9.theme_classic()
+ p9.scale_color_cmap_d("viridis")
)