Skip to content
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

Unname the result of manual_pal() #284

Closed
yutannihilation opened this issue Jun 26, 2020 · 2 comments · Fixed by #291
Closed

Unname the result of manual_pal() #284

yutannihilation opened this issue Jun 26, 2020 · 2 comments · Fixed by #291

Comments

@yutannihilation
Copy link
Contributor

(Originally discussed at tidyverse/ggplot2#4087 (comment))

ggplot2's scale_manual() family uses two types of mapping colours to values; by position and by name. manual_pal() is meant to be used for the latter one. But, since the palette manual_pal() provides aren't unnamed, it might be accidentally mapped in by-name manner (See tidyverse/ggplot2#4087 for an example). So, I think it should be unname()ed as the names are not useful anyway, I believe.

If this looks good, I'll create a pull request for this.

@hadley
Copy link
Member

hadley commented Jul 23, 2020

Yeah, that sounds good to me.

@yutannihilation
Copy link
Contributor Author

Thanks, here it is: #291

hadley pushed a commit that referenced this issue Jul 24, 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 a pull request may close this issue.

2 participants