Editing plot text
While our initial plot is a good start, there's a lot more we'll want to do to get it ready for "prime time." Let's start by making the x-axis readable, changing the axis labels, and making the y-axis ticks percentage.
The dataset usefulness_by_platform
has been loaded for you.
This exercise is part of the course
Categorical Data in the Tidyverse
Exercise instructions
- Change the x-axis text to be rotated 90 degrees.
- Change the x-axis label to "Learning Platform" and y-axis label to "Percent finding at least somewhat useful".
- Change the y-axis scale to be a percentage.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
ggplot(usefulness_by_platform, aes(x = learning_platform, y = avg_usefulness)) +
geom_point() +
# Rotate x-axis text by 90 degrees
theme(___ = element_text(angle = __, hjust = 1)) +
# Rename y and x axis labels
labs(___ "Learning Platform", ___ "Percent finding at least somewhat useful") +
# Change y axis scale to percentage
___(labels = scales::scales::percent_format())