开始使用免费开始使用

修改标题的外观

除了应用预设的 theme,您还可以通过调整不同的样式属性进一步微调图形。提示:您可以复用并覆盖上一个练习中生成的 ilo_plot 变量——当前图已经在右侧窗口中显示。

本练习是课程的一部分

在 Tidyverse 中用数据进行沟通

查看课程

练习说明

  • 使用自定义的 theme() 调用与 element_text()

    • 文本的字体 family 改为 "Bookman"
    • 另外,将标题注释color 分别改为 "gray25""gray30"
    • 通过将 size 提高到 12,使副标题稍大一些。

交互式实操练习

通过完成这段示例代码来试试这个练习。

ilo_plot <- ilo_plot +
  theme_minimal() +
  # Customize the "minimal" theme with another custom "theme" call
  theme(
    text = element_text(___ = ____),
    title = element_text(___ = ____),
    plot.caption = element_text(___ = ___),
    plot.subtitle = element_text(___ = ____)
  )

# Render the plot object
ilo_plot
编辑并运行代码