In ggplot2, geom_* callables support a key_glyph argument:
Each geom has an associated function that draws the key when the geom needs to be displayed in a legend. These functions are called draw_key_*(), where * stands for the name of the respective key glyph. The key glyphs can be customized for individual geoms by providing a geom with the key_glyph argument ( from https://github.com/tidyverse/ggplot2/blob/main/R/legend-draw.R)
In the future, it would be really useful if plotnine supported it as well.
In
ggplot2
,geom_*
callables support akey_glyph
argument:In the future, it would be really useful if plotnine supported it as well.
See https://ggplot2.tidyverse.org/reference/draw_key.html