All about attributes: conflicts with aesthetics
In the videos you saw that you can use all the aesthetics as attributes. Let's see how this works with the aesthetics you used in the previous exercises: x
, y
, color
, fill
, size
, alpha
, label
and shape
.
In this exercise you will set all kinds of attributes of the points!
You will continue to work with mtcars
.
This exercise is part of the course
Introduction to Data Visualization with ggplot2
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
ggplot(mtcars, aes(wt, mpg, color = fcyl)) +
# Add point layer with alpha 0.5
___