added fill to gpar in geom_curve()#2375
Conversation
R/geom-curve.r
Outdated
| #' @usage NULL | ||
| #' @export | ||
| GeomCurve <- ggproto("GeomCurve", GeomSegment, | ||
| default_aes = aes(colour = "black", fill = "black", size = 0.5, linetype = 1, alpha = NA), |
There was a problem hiding this comment.
I think you can omit this since it will be inherited from geom_segment()
|
Can you please add a bullet to NEWS? It should briefly describe the change (starting with name of the function), and crediting yourself with I think this is a slight change to behaviour? i.e. if you had arrows and mapped the colour to a variable, the arrows will now be black instead of coloured? |
|
It is a change in behavior, and on further reflection making the arrow fill an aesthetic may cause problems for some. First, under the old behavior Second, the question is whether the arrow head should take the color of Unless @hrbrmstr beats me to it, I can address this towards the end of the week. Not today, unfortunately. |
|
For now, I'd prefer to make this a parameter of the geom, and then we can figure out how to make it an aesthetic post-2345. |
|
So, it'd be a parameter that is set to |
|
Exactly - you can just copy what |
|
Aye. I'll make all those changes later today and also mod the docs + NEWS |
and, for good measure |
|
Roxygen docs were also updated as well as the |
NEWS.md
Outdated
| line makes it easier to judge the fit of the theoretical distribution | ||
| (@nicksolomon). | ||
|
|
||
| * Added `arrow.fill` parameter to `geom_segment()` and `geom_curve()` to |
There was a problem hiding this comment.
Can you please rewrite so the function names come first? (And then use that to alphabetise within this list of changes?)
(Normally I do that just before release but this release has been dragging on because I haven't found the time to finish it off)
|
Thanks! |
|
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |






Based on https://stackoverflow.com/questions/47878787/fill-arrow-on-geom-curve-ggplot2/47879776#47879776
this adds a missing
fillgpar(i.e. back on par withgeom_segment) and takes care of ^^ issue.I also added the
fillaesthetic togeom_segment()and changed thefillthere to use it.this means the arrows can be filled in for both.
NOTE: @clauswilke had the idea to add the fill aesthetic to
geom_curveand I figuredgeom_segmentshldn't be left out.