I would like to increase the font of the correlation values to be bigger and bold. I used this command
as<- ggcorrplot(sticor,
hc.order = TRUE,
type = "lower",
lab = TRUE)
as + theme(text = element_text(size = 20, face = "bold"),
legend.title=element_text(size=15),
legend.text=element_text(size=15),axis.text.y = element_text(size=20, face = "bold"),axis.text.x = element_text(size=20, face= "bold"))
You could just modify the function. I think that's the problem with such high level functions that are not necessarily very flexibly designed. For example, by adding
...
you could make this function a bit more flexible. Below a massively stripped down version ofggcorrplot::ggcorrplot
, which shows the principle idea - adding...
to the function arguments and then to the right place in the function (the call to geom_text) allows then the use of font_face - see comments in code.In this function version, I have removed all if/else statements, and slightly simplified the plot styling elements.