开始使用免费开始使用

应用默认主题

正如您在视频中学到的,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
编辑并运行代码