Fill closed arrows in element_line()#2924
Merged
yutannihilation merged 6 commits intotidyverse:masterfrom Nov 14, 2018
Merged
Conversation
clauswilke
reviewed
Oct 1, 2018
R/theme-elements.r
Outdated
| # The gp settings can override element_gp | ||
| gp <- gpar(lwd = len0_null(size * .pt), col = colour, lty = linetype, lineend = lineend) | ||
| gp <- gpar(lwd = len0_null(size * .pt), col = colour, lty = linetype, | ||
| lineend = lineend, fill = colour) |
Member
There was a problem hiding this comment.
Could you use tidyverse-style formatting? The same applies for the other change.
gp <- gpar(
lwd = len0_null(size * .pt), col = colour, lty = linetype,
lineend = lineend, fill = colour
)
Member
There was a problem hiding this comment.
And maybe reorder the parameters so col and fill go together and then lwd, lty, and lineend.
Member
|
Thanks! This will have to wait until after the 3.1.0 release. |
Member
Author
|
Thanks for reviewing! I'll wait (and will add a NEWS bullet after the release). |
Member
Author
|
@clauswilke Could you review this again when you have time? |
clauswilke
approved these changes
Nov 13, 2018
Member
Author
|
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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2922
Currently,
element_grob.element_line()doesn't specifyfillingpar(). This PR specifies it to fill arrows.Created on 2018-10-02 by the reprex package (v0.2.1)
Note that, for consistency with
geom_segment()andgeom_curve(),element_line()might needsarrow.fillparameter, but it seems a bit harder to introduce a new parameter to theme. So, users need to rely on this workaround if they want different colours.