Skip to content

follow tidyverse recycling rules for aesthetics #4670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 16, 2021

Conversation

thomasp85
Copy link
Member

Fix #4588

This PR allows mix of 0-length and 1-length vectors (recycled to 0) in aesthetics... It both puts ggplot2 in line with our decided recycling rules and makes it less error-prone to set aesthetics to scalars as these values can now be mixed with all sizes of data (even 0)

@thomasp85 thomasp85 requested a review from hadley November 12, 2021 09:37
@hadley
Copy link
Member

hadley commented Nov 12, 2021

Add a small test?

@jubilatious1

This comment has been minimized.

@hadley

This comment has been minimized.

@jubilatious1

This comment has been minimized.

@thomasp85 thomasp85 merged commit 65d3bfc into main Nov 16, 2021
@thomasp85 thomasp85 deleted the issue-4588-recycling-to-0 branch November 16, 2021 20:05
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.

Misleading error message when plotting with empty data.frame
3 participants