Skip to content

Allow "lower" outline type in geom_ribbon and family - #3707

Merged
thomasp85 merged 2 commits into
tidyverse:v3.3.0-rcfrom
thomasp85:outline-lower
Jan 9, 2020
Merged

thomasp85 merged 2 commits into
tidyverse:v3.3.0-rcfrom
thomasp85:outline-lower

Conversation

@thomasp85

Copy link
Copy Markdown
Member

Currently only "both" and "upper" settings are valid for the new stroking in geom_ribbon()/geom_area() While the need for "lower"can perhaps be debated, I don't see a reason to not allow it. This PR adds the functionality

@thomasp85 thomasp85 added this to the ggplot2 3.3.0 milestone Jan 8, 2020

@yutannihilation yutannihilation left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, actually I proposed "lower" originally (#3529 (comment)) but it seems I've forgot it for unknown reason, sorry...

You also need to add "lower" here:

outline.type <- match.arg(outline.type, c("both", "upper", "legacy"))

In addition, I'm feeling we should add a test for lower for consistency:

g_ribbon_upper <- layer_grob(p + geom_ribbon(outline.type = "upper"))[[1]]

@yutannihilation yutannihilation left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good.

@thomasp85
thomasp85 merged commit 0799463 into tidyverse:v3.3.0-rc Jan 9, 2020
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.

2 participants