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

labels = NULL in discrete_scale generates an error #1183

Closed
Henrik-P opened this issue Jul 20, 2015 · 0 comments
Closed

labels = NULL in discrete_scale generates an error #1183

Henrik-P opened this issue Jul 20, 2015 · 0 comments

Comments

@Henrik-P
Copy link

From ?discrete_scale:
"labels: NULL for no labels."

But:

df <- data.frame(x = 1, y = 1)

p <- ggplot(df, aes(x = x, y = y, color = factor(x))) + 
        geom_point()
p

p + scale_color_discrete(labels = NULL)
# Error in data.frame(values = scale_map(scale, breaks), labels = I(scale_labels(scale)),  : 
#                      arguments imply differing number of rows: 1, 0

See also this post on SO

@hadley hadley closed this as completed in 07f87bf Jul 22, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant