ggplot2 icon indicating copy to clipboard operation
ggplot2 copied to clipboard

`geom_label` doesn't allow for varying line types

Open FDylanT opened this issue 2 years ago • 4 comments

I would like to be able to manipulate the line type of the box produced by geom_label or annotate("label") (e.g. from a solid to a dashed line). At present, linetype isn't an accepted parameter in this geom, and produces an "ignoring unknown parameters" warning.

FDylanT avatar Jul 26 '23 14:07 FDylanT

Is the goal here to have it as a mappable aesthetic or as a fixed parameter to pass to geom_label()?

teunbrand avatar Aug 02 '23 17:08 teunbrand

Implementing this as a mapped aesthetic is dead simple. I can make a pull request if you like.

aphalo avatar Sep 14 '23 21:09 aphalo

We'd be happy to review a PR implementing this. The non-obvious bit that comes to mind is that draw_key_label() needs to reflect the linetype as well.

teunbrand avatar Sep 14 '23 22:09 teunbrand

o.k., I will give it a try next week. Thanks for the hint!

aphalo avatar Sep 15 '23 09:09 aphalo