I'm trying to create a matrix plot using GGally::ggpairs
that just has scatterplots in the upper portion of the figure:
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()
Which gives
.
The problem is I can't work out how to display the axis labels with the lower potion being blank. This answer explained how to remove elements but not add them back in. Other things I've tried:
axisLabels = "show"
and showStrips = TRUE
don't make a difference to the plot
axisLabels = "internal"
moves the variable titles into the diagonal which I don't want. The text is also grey on a grey background, and axis.title.x = element_text(colour = "white")
didn't fix that either.
Is there a way to have variable labels above the plots and axis labels below them, while keeping the plots in the upper half of the plot?