0

I'm an R newbie and have searched for the answer to this to no avail.

I have a simple ggplot scatterplot that I set the color to "cluster" of which there are 3. The plot comes out great and is colored in 3 shades of blue. I want the colors to be dark blue, orange, and green. How do I do this? I've been toying with scale_color_manual and cannot get anything to work.

Cheers Jeff

2 Answers 2

0

Possibly cluster is a numeric variable, then ggplot uses scale_color_continuous. Try converting "cluster" to character or to factor and then try scale_color_manual

Sign up to request clarification or add additional context in comments.

Comments

0

What does your data/code look like? You scale_color_manual should look like this:

scale_color_manual(values=c("blue", "orange", "green")

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.