เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

ใช้ธีมเริ่มต้น

อย่างที่ได้เรียนในวิดีโอ ggplot2 มีธีมที่กำหนดไว้ล่วงหน้าให้เลือกใช้หลายแบบ มาลองใช้ดูกัน!

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

การสื่อสารด้วยข้อมูลใน Tidyverse

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Save your current plot into a variable: ilo_plot
___ <- ggplot(plot_data) +
  geom_point(aes(x = working_hours, y = hourly_compensation)) +
  labs(
    x = "Working hours per week",
    y = "Hourly compensation",
    title = "The more people work, the less compensation they seem to receive",
    subtitle = "Working hours and hourly compensation in European countries, 2006",
    caption = "Data source: ILO, 2017"
  )

# View it
ilo_plot
แก้ไขและรันโค้ด