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
scale_colour_manual(palette=foo): cannot coerce type 'closure' to vector of type 'character' #3182
Comments
I don't think library(ggplot2)
library(Polychrome)
# Does not work.
alphabet_colors <- function(n) as.vector(Polychrome::alphabet.colors(n))
ggplot(diamonds, aes(x = carat, y = price, colour = clarity)) +
geom_point() +
scale_colour_viridis_d(palette = alphabet_colors)
#> Error in as.vector(x, "character"): cannot coerce type 'closure' to vector of type 'character' Created on 2019-03-10 by the reprex package (v0.2.1) |
Settings |
It's not meant to be used at all. The bug is that |
Great. Thanks for the clarification. Feel free to close this issue if you like. |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
Using the
palette
argument ofscale_colour_manual
yields the error:Error in as.vector(x, "character"): cannot coerce type 'closure' to vector of type 'character'
My apologies in advance if it's my error.
@th4ckl on Twitter says…
https://twitter.com/th4ckl/status/1104207569034199040
Reprex
Created on 2019-03-09 by the reprex package (v0.2.1)
The text was updated successfully, but these errors were encountered: