ggarrange()我正在尝试注释我使用包中安排的绘图网格ggpubr。为此,我annotate_figure()在生成绘图后使用该函数。
我的问题:当以交互方式进行操作时(即不使用我的绘图创建文件),它工作得很好,但是当我导出文件(使用ggexport())时,注释不会显示。
示例: 参见文档中给出的示例
data("ToothGrowth")
df <- ToothGrowth
df$dose <- as.factor(df$dose)
# Create some plots
# ::::::::::::::::::::::::::::::::::::::::::::::::::
# Box plot
bxp <- ggboxplot(df, x = "dose", y = "len", color = "dose", palette = "jco")
# Dot plot
dp <- ggdotplot(df, x = "dose", y = "len", color = "dose", palette = "jco")
# Density plot
dens <- ggdensity(df, x = "len", fill = "dose", palette = "jco")
# Arrange and annotate …Run Code Online (Sandbox Code Playgroud)