logo-MindMajix
n
naseer mohammad

Posted on 26th July 2024|423 views

0
votes

Scale Color Manual

What changes should I do if my scale_color_manul() is not working?

see the below code the scale_color_manul() is not working

ggplot(df, aes(x=cond, y=yval)) + geom_point() + scale_color_manual(values=c("green", "yellow", "orange"))

 

1 answers
Answers
P
James ROBERT

Posted on 26th July 2024| views

You just need to map color to the variable like this

ggplot(df, aes(x=cond, y=yval, color = cond)) + geom_point() + scale_color_manual(values=c("green", "yellow", "orange"))

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number