Skip to content

Conversation

@thomasp85
Copy link
Member

This PR fixes #4653, but also goes a step further and makes the use of lineend and linejoin 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 the linetype 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". For linejoin it is either "mitre" (for squar-ish geoms), or "round" (for smooth geoms).

All draw_key_* functions will now look for linetype and lineend in params 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

@thomasp85 thomasp85 requested a review from clauswilke November 9, 2021 13:27
Copy link
Member

@clauswilke clauswilke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I don't see anything that causes me concerns. Though it's a lot of changes at once, so I may have missed something. Let's hope for the best. :-)

@thomasp85 thomasp85 merged commit 6704ea1 into main Nov 10, 2021
@thomasp85 thomasp85 deleted the issue-4653-draw-key-lineend branch November 10, 2021 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent setting of lineend in draw_key_*

3 participants