首页 > 解决方案 > facet_wrap_paginate x 轴偏离最后一页的位置

问题描述

我面临的问题是 facet_wrap_paginate 在最后一页上,x 轴位于图片的底部,而不是位于图的底部。

第 1 页

ggplot(diamonds) +
    geom_point(aes(carat, price), alpha = 0.1) +
    facet_wrap_paginate(~cut:clarity, ncol = 3, nrow = 6, page = 1)

在此处输入图像描述

这是最后一页:

第 4 页

ggplot(diamonds) +
    geom_point(aes(carat, price), alpha = 0.1) +
    facet_wrap_paginate(~cut:clarity, ncol = 2, nrow = 6, page = 4)

在此处输入图像描述

如您所见,“克拉”标签位于底部,而不是与图一起。有什么解决办法吗?

谢谢!

标签: rggplot2facet-wrapggforce

解决方案


推荐阅读