-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed arrow on axis.line
is not filled
#2922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See https://github.com/tidyverse/ggplot2/pull/2375 and https://stackoverflow.com/questions/47878787/fill-arrow-on-geom-curve-ggplot2. Looks like recent fixes to
|
Right, so the only adjustment to arrow specified is that it's closed: library(tidyverse)
arrow = arrow(angle=10, type = "closed")
ggplot(iris, aes(x=Sepal.Length, y=Sepal.Width, color=Species)) +
geom_point() +
theme(axis.line = element_line(arrow=arrow)) +
annotate("segment", x = 3, xend = min(iris$Sepal.Length), y = 4, yend = 3, arrow=arrow) arrow = arrow(angle=10)
ggplot(iris, aes(x=Sepal.Length, y=Sepal.Width, color=Species)) +
geom_point() +
theme(axis.line = element_line(arrow=arrow)) +
annotate("segment", x = 3, xend = min(iris$Sepal.Length), y = 4, yend = 3, arrow=arrow) Created on 2018-10-01 by the reprex package (v0.2.1.9000) The
|
Here's a PoC: yutannihilation#2 But, adding a new parameter may break the existing theme; we get relatively little gain compared to the risk? Sorry, I think I'm not really sure how theme works... |
As a workaround, you can turn clipping off in the coord and then just replace the axis line with a segment drawn by |
@yutannihilation I'm not immediately sure about the implications of a new parameter either. But I would argue that a filled arrow should by default be filled with the color that is used to draw the outline. Maybe you could implement that, without adding a new parameter? |
Then, if somebody really needs a different fill color, they can use the |
Agreed, thanks. I was thinking too complicatedly. |
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/ |
The arrow on
axis.line
is not filled when the type is set to "closed", however other arrows of the same type are filled. See example.Created on 2018-10-01 by the reprex package (v0.2.1)
The text was updated successfully, but these errors were encountered: