Skip to content

Feature request: New geom_dash() #6430

Closed as not planned
Closed as not planned
@jbengler

Description

@jbengler

Hi Teun!

Measures of central tendency—like the mean or median—are often visualized using a horizontal dash. To my knowledge, this is not easily done in current ggplot2. Some workarounds exist, such as using geom_errorbar() in creative ways. However, this approach stacks several lines on top of each other. It also requires a good understanding of how to tweak stat_summary(). Overall, current options feel unnecessarily clunky to me.

https://stackoverflow.com/questions/59018229/adding-a-dashed-line-to-mark-the-mean-in-ggplot

Therefore, I drafted a new geom_dash(), which you can see in action below. In case this would be of interest, I could provide a PR to be used as a starting point.

Image Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions