Choose one or two of your previous plots, and give the scales a proper name.
Hint: Use one or more scale_...()
functions.
What happens if you call the same scale_...()
function twice in a plot?
Add an overview over all available colorblind friendly Brewer scales to your rmarkdown document.
Hint: Insert a code chunk containing RColorBrewer::display.brewer.all(colorblindFriendly = TRUE)
Choose an appealing scale for one of your plots that use the “color” or “fill” aesthetics. Apply it with scale_..._brewer("<name>", palette = "<palette>")
Hint: Use scale_..._distiller()
if you have mapped a continuous variable.
Practice Markdown: Create sections, subsections, item lists, emphasized and bold text, … .
Create a flipped boxplot of fuel economy by transmission type.
Plot highway vs. city fuel economy with an additional geom_abline()
layer. How do you set a 45° degree for the diagonal line?
Try to “estimate” an approximate ratio between the two economy measures by tweaking the slope
argument to geom_abline()
.
Choose your favorite among the predefined themes.
Hint: All start with theme_...()
, but watch out for theme_set()
.
Apply theme(legend.position = "bottom")
to a plot with a color or fill legend. What happens if you then apply theme_bw()
? Why?
Copyright © 2018 Kirill Müller. Licensed under CC BY-NC 4.0.