Consistent use of lineend and linejoin in geoms and keys #4664
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.
This PR fixes #4653, but also goes a step further and makes the use of
lineend
andlinejoin
parameters more consistent across the board.Until now,
lineend
has only been possible to set in a few geom that has explicit ends in their lines, but this parameter affect the ends of stippled lines so should be exposed everywhere thelinetype
aesthetic is available.Further,
linejoin
has also been unavailable in a wide range of geoms, meaning that the corners of e.g. box plots couldn't be controlled. This has now been fixed.Across the board, the default
lineend
is now"butt"
. Forlinejoin
it is either"mitre"
(for squar-ish geoms), or"round"
(for smooth geoms).All
draw_key_*
functions will now look forlinetype
andlineend
inparams
if meaningful so that their display matches that shown in the plot.Note: This PR removes the hack around rectangle joins we put in place cf #3037 (comment). This is to make behaviour consistent across geoms. I believe the existence of ragg and all the continued issues with the windows device means that we should not forever cripple our code base to appease it