BaşlayınÜcretsiz Başlayın

Labeling facets

If your factor levels are not clear, your facet labels may be confusing. You can assign proper labels in your original data before plotting (see next exercise), or you can use the labeller argument in the facet layer.

The default value is

  • label_value: Default, displays only the value

Common alternatives are:

  • label_both: Displays both the value and the variable name
  • label_context: Displays only the values or both the values and variables depending on whether multiple factors are faceted

Bu egzersiz

Intermediate Data Visualization with ggplot2

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Plot wt by mpg
ggplot(mtcars, aes(wt, mpg)) +
  geom_point() +
  # The default is label_value
  ___(___ = ___(___))
Kodu Düzenle ve Çalıştır