Support `key_glyph`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.8k
- Forks
- 254
- Avg merge
- 10h 35m
- Merged PRs (30d)
- 9
Description
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 thekey_glyphargument ( 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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining plotnine's geom_* callables and how they create legend keys, then compare the requested behavior with ggplot2's legend-draw.R and draw_key.html references. Define how a key_glyph argument selects or supplies a draw_key_* function, and verify that customized legend glyphs work for individual geoms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100