Skip to content

Conversation

@thomasp85
Copy link
Member

Fix #4559

This is a simple fix that converts all instances of NA in the size aesthetic to 0

Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

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

Great!

# override.aes in guide_legend manually changes the geom
data <- modify_list(data, guide$override.aes)

if (!is.null(data$size)) {
Copy link
Member

Choose a reason for hiding this comment

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

I forget if data is a data.frame here, but if it is, I wonder of "size" %in% names(data) is a bit better (lest data ever become a tibble)

Copy link
Member Author

Choose a reason for hiding this comment

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

We have this pattern all over the place so once we begin to accept tibbles inside the code we will have a lot of places to fix up

@thomasp85 thomasp85 merged commit 073c9a0 into main Nov 16, 2021
@thomasp85 thomasp85 deleted the issue-4559-size-NA branch November 16, 2021 20:01
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.

Setting size = NA on a geom causes error in legend generation

3 participants