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

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


None yet
1 participant

Henrik-P commented Jul 20, 2015

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


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

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

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 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.