GGally :: ggpairs - 显示轴和变量标签

时间:2018-03-27 11:20:52

标签: r ggplot2 ggally

我正在尝试使用GGally::ggpairs创建一个矩阵图,它只在图的上半部分有散点图:

library(ggplot2)
library(GGally)

data(iris)
ggpairs(iris, columns = 1:4, diag = "blank",
    upper = list(continuous = wrap("points", colour = "#e0f3f8", size = 1)),
    lower = list(continuous = wrap("blank"))) +
    ggplot2::theme_dark()

哪个给出了

this output added

问题是我无法弄清楚如何在下部药水空白的情况下显示轴标签。 This answer解释了如何删除元素但未将其重新添加。我尝试过的其他内容:

axisLabels = "show"showStrips = TRUE对情节没有影响

axisLabels = "internal"将变量标题移动到我不想要的对角线。灰色背景上的文字也是灰色的,而axis.title.x = element_text(colour = "white")也没有解决这个问题。

有没有办法在它们下方的图和轴标签上方放置变量标签,同时将图保持在图的上半部分?

0 个答案:

没有答案