Closed as not planned
Description
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.



