From the course: R Essential Training: Wrangling and Visualizing Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using color palettes

Using color palettes

From the course: R Essential Training: Wrangling and Visualizing Data

Start my 1-month free trial

Using color palettes

- [Instructor] You can save yourself some time and get a more cohesive presentation by using color palettes or collections of colors that you can use for your graphics in R. I want to show you several different ways that you can do this. I'm going to start by loading a few packages. Pacman and then I'm going to load the datasets and tidyverse and so on. And I'm going to use the same tiny dataset, only six numbers that I use in the colors demonstration and let's get the default bar plot. There it is, the gray, which is not bad for your own personal exploration. But you can also use palettes. Now, I want to start by getting a little bit information about palettes by doing question mark palette. And then you see here, we've got some help information and let's see what the current palette is. I just say palette, then open and close parentheses. And it tells me it's black, red, green3 and so on. Now, we can use that set…

Contents