相关疑难解决方法(0)

在ggplot2中将文本框添加到构面包装布局中

我知道有人可以注释ggplot2创建的绘图,甚至可以组合大小视口,如ggplot2-book中所述.但是,似乎这些仅适用于实际的情节区域而不是"最终情节".

例如,我有一个这样的情节: 在此输入图像描述

在这里,我们看到十个面板显示应用于二项式数据集的线性回归平滑器,但这不是重点.现在我想在图表的右下角以文本的形式提供摘要(存储在数据框中),例如... 在此输入图像描述

我没有找到任何甚至接近的例子.任何提示,帮助或评论都非常感谢!

plot r annotate ggplot2

10
推荐指数
1
解决办法
1227
查看次数

R: Reliable conversion between gtable and ggplot objects. How to make lemon::reposition_legend() work after ggplot_build()?

I have a pretty complicated case at hand with ggplot2. I tried to exemplify it with a MWE using iris data below.

I just have boxplots in facets, and wanted to move the legend to take the space of the empty facets.

This is all good, I use lemon::reposition_legend() for that and it works.

However, I then have to modify a bunch of things in the plot (namely add significant test results and other things that are not relevant …

r legend facet ggplot2 r-lemon

4
推荐指数
1
解决办法
708
查看次数

标签 统计

ggplot2 ×2

r ×2

annotate ×1

facet ×1

legend ×1

plot ×1

r-lemon ×1