2

Please refer to the following link on the solution to a previous question. After overriding the "ggally_cor" function, it is very handy to be able to plot the correlation coefficient adjusting the size to its equivalent estimated value, however, this does not seems to work if I wanted to produce plots grouped via a factor variable. I wonder how it can be adjusted to account for this?

GGally::ggpairs plot without gridlines when plotting correlation coefficient

Code that I used to plot grouped data:

library("GGally")
data(iris)
ggpairs(iris, columns = c(1,2,3,4), lower=list(continuous="points"),
        diag=list(continuous="bar", params=c(position = "dodge")), 
         upper=list(params=list(corSize=6)), axisLabels='show', colour="Species",legend=T)

I would also like to know how to increase the font size for axis titles (theme(axis.title=element_text(size=15, face="bold")) doesn't seems to work) and display a legend (legend=T does not seems to do the job).

Community
  • 1
  • 1
steve
  • 31
  • 5

1 Answers1

0

After consulting ?theme and making a couple of experiments I arrived at:

   +theme( strip.text = element_text(size = 5))
IRTFM
  • 258,963
  • 21
  • 364
  • 487