has2k1 / has2k1/plotnine

Missing geom_curve and units for annotated arrow

Open
#535 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
Dominant language
Python
Stars
4.8k
Forks
254
Avg merge
10h 35m
Merged PRs (30d)
9

Description

I love plotnine. Just ran into an issue where I can't annotate a curved arrow on a plot. There are at least two problems.

  1. No geom_curve is implemented
  2. No unit() is defined
p = (
    ggplot(df, aes(x="x", y="y"))
    + geom_point()
    + annotate("text", x = .8, y = .9, label = "Wat!?")
    + annotate(geom = "curve", x = .8, y = .9,xend=.9,yend=.78, curvature=-0.3,arrow=arrow(length=unit(2,"mm")))
    + theme_minimal()
)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the annotate calls shown in the issue, especially geom="curve" and arrow=arrow(..., unit(...)). Determine how curved arrows and measurement units should behave in plotnine, then verify that both example calls work and produce the expected annotated plot.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.