Flipping axes II
In this exercise, we'll continue to use the coord_flip()
layer function to reverse the variables mapped onto the x
and y
aesthetics.
Within the mtcars
dataset, car
is the name of the car and wt
is its weight.
This exercise is part of the course
Intermediate Data Visualization with ggplot2
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Plot of wt vs. car
___ +
# Add a point layer
___ +
labs(x = "car", y = "weight")