Does R have color palettes?
In other words, I am looking for an array of 6 or so color names that go well together in a graph or plot; maybe there are some predefined schemes like that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The easiest way to generate a palette is using generic functions from the basic grDevices package:
These are useful if the desired number of colors doesn’t exceed 7-8. The only necessary argument is the number of colors in palette.
There is also
gray()function which can be used to generate various schades of gray.Or you could do something like: