12/9/2017
You can either type "Colors in R" into Google or use
Here are some graphs I made in the Bike Data Project:
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))
hist(trip_age$age, main = "Member Age", xlab = "Number of Riders", col = "lightsalmon", border = "indianred4", breaks = 25)
ggplot(data = weather, aes(x = Events)) + geom_bar(col = "green4", fill = "olivedrab2") + labs(x = "Events", y = "Number of Events") + theme_bw()
Identity scale is used when your data is already scaled, when the data and aesthetic spaces are the same.
It's nice to be able to plot in color when there is overplotting or a lot of data.
It's nice to be able to use transformations to scale with color using scale_x_continuous()
and scale_y_continuous()
.
You can use scale_colour_gradientn()
, a custom n-colour gradient, so that you have colors meaningful for your data.