【发布时间】:2019-04-13 14:37:28
【问题描述】:
下面是我编写的复杂自定义函数的一个更简单的示例。在这个函数的全长形式中,
-
"layer1"对应用户输入的caption, -
"layer2"对应于统计测试的结果,并且 -
"layer3"对应于所执行的统计测试的详细信息。
但是当所有三层都包含在标题中时,它看起来像这样-
library(ggplot2)
ggplot(iris, aes(Species, Sepal.Length)) +
geom_boxplot() +
labs(caption = substitute(atop(substitute(
atop("layer1", "layer2")
)
, "layer3")))
由reprex package (v0.2.1) 于 2018 年 11 月 9 日创建
所以我想找到一种方法,可以让所有三层的文本大小保持不变。我实际上不确定为什么在这种情况下文本大小会自动更改。
有什么办法可以防止这种情况发生吗?
【问题讨论】:
标签: r ggplot2 tidyverse plotmath