sev*_*rin 5 r footnotes ggplot2
我想在我的ggplot下写一些笔记。我在 R 中做了我的数据分析,现在使用 markdown 包来写我的论文。这意味着我可以轻松地在 Markdown 脚本中包含变量。在那个脚本中,我创建了一些 ggplots 并想知道是否有一种简单的方法可以将这些解释写入情节。对于表格,它非常简单。%>% footnote(general="")
诀窍。
情节有类似的东西吗?
Ank*_*nha 13
也许你正在寻找这样的东西?
p <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point() + labs(title = "Your title", caption = "Your long reference footnote goes in here")
Run Code Online (Sandbox Code Playgroud)
您需要使用函数中的caption
参数labs()
。
例子: