Edytowanie tekstu na wykresie
Nasz wstępny wykres to dobry punkt wyjścia, ale zanim będzie gotowy do prezentacji, warto go jeszcze dopracować. Zacznijmy od poprawy czytelności osi X, zmiany etykiet osi i wyświetlenia wartości na osi Y jako procenty.
Zbiór danych usefulness_by_platform jest już wczytany.
To ćwiczenie jest częścią kursu
Dane kategoryczne w Tidyverse
Instrukcje do ćwiczenia
- Obróć tekst na osi X o 90 stopni.
- Zmień etykietę osi X na "Learning Platform", a etykietę osi Y na "Percent finding at least somewhat useful".
- Zmień skalę osi Y na wartości procentowe.
Interaktywne ćwiczenie praktyczne
Spróbuj tego ćwiczenia, uzupełniając ten przykładowy kod.
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::percent_format())