12/9/2017

COLORS

How can you find those colors?

Examples:

Here are some graphs I made in the Bike Data Project:

Example Code:

ggplot(data = station, aes(x=current_dockcount))+
  geom_bar(fill = "lavender", color = "purple") + 
  labs(y = "Frequency", x = "Number of Bikes Per Station", 
       title = "Current Dock Count") + 
  theme_bw() +
  theme(plot.title = element_text(hjust = 0.5))

Examples:

Example Code:

hist(trip_age$age, main = "Member Age", xlab = "Number of Riders", 
    col = "lightsalmon", border = "indianred4", breaks = 25)

Examples:

Example Code:

ggplot(data = weather, aes(x = Events)) + 
  geom_bar(col = "green4", fill = "olivedrab2") + 
  labs(x = "Events", y = "Number of Events") + 
  theme_bw()

Cooler Colors:

Identity Scale:

Identity scale is used when your data is already scaled, when the data and aesthetic spaces are the same.

Colorful Points:

It's nice to be able to plot in color when there is overplotting or a lot of data.

Scale in Color:

It's nice to be able to use transformations to scale with color using scale_x_continuous() and scale_y_continuous().

Gradient Color:

You can use scale_colour_gradientn(), a custom n-colour gradient, so that you have colors meaningful for your data.