I am using the following code to generate a pairplot in R
require(GGally)
data %>%
GGally::ggscatmat(columns = 3:13 ,color = "Type", corMethod = "spearman") +
ggsci::scale_color_jco()+
ggpubr::theme_pubclean()+
theme(strip.background = element_rect(fill = "grey90"),
axis.text = element_text(size = 8),
legend.position = "right",
legend.key = element_blank())
This code works totally fine when I use 9 columns of the dataset. However, when the number of columns exceeds 9, like 10 or 11 or more, it rotates the last two columns, overlap on y-axis and generates a plot like this
I tried changing screen size, exported image size and font size but nothing works!
Please see that the scatter plot overlapping in the last two columns should have been plotted as rows at the bottom.
The dataset can be accessed from my dropbox at following link