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 in scale_color_manual() are ignored #2370

Open
MLopez-Ibanez opened this issue Jul 23, 2024 · 0 comments
Open

labels in scale_color_manual() are ignored #2370

MLopez-Ibanez opened this issue Jul 23, 2024 · 0 comments

Comments

@MLopez-Ibanez
Copy link
Contributor

Reported first here: Scale_color_manual() labels not working

# insert reprex here
p <- ggplot(mtcars, aes(mpg, wt)) +
  geom_point(aes(colour = factor(cyl)))
cols <- c("8" = "red", "4" = "blue", "6" = "darkgreen", "10" = "orange")
p <-    
 p + scale_colour_manual(
  values = cols,
  breaks = c("4", "6", "8"),
  labels = c("four", "six", "eight")
)

The examples provided by plotly.com show the problem here: https://plotly.com/ggplot2/Scales/scale_manual/

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

No branches or pull requests

1 participant