feature request: displaying significance asterisks with coefficient labels
Will it be possible for ggcorrplot to allow users to not only display the correlation coefficients but also asterisks denoting the significance level?
Like: http://www.strengejacke.de/sjPlot/reference/sjp.corr.html#examples

good suggestion, thanks!
You can try my R package ggcorrplot2, which can label significant correlation coefficients with asterisks denoting the significance level.

@caijun Cool! You should submit this to https://github.com/ggplot2-exts/gallery to increase its visibility!
Hi, I know it's been more than a year but I also wanted to achieve this functionality using ggcorrplot and I played around with the source code to obtain a solution.
If you copy the whole code for the ggcorrplot() function, then on line 215 the original code is:
p.mat <- subset(p.mat, p.mat$value > sig.level)
Substitute this with
p.mat <- subset(p.mat, p.mat$value <= sig.level & p.mat$value != 0)
The != 0 part is assuming you would choose the full correlation plot and is there to prevent the diagonal in the middle from having the asterisk and I believe no p value should practically be 0 so it should be fine
Then on line 295 I added the position argument inside the function:
# matrix cell glyphs
if (!is.null(p.mat) & insig == "pch") {
p <- p + ggplot2::geom_point(
data = p.mat,
mapping = ggplot2::aes_string(x = "Var1", y = "Var2"),
shape = pch,
size = pch.cex,
color = pch.col,
position = position_nudge(x=0.35,y=0.16)
)
}
Of course, depending on visual preference, the nudge can be customized through the x and y argument. Then in the function, just choose pch = 8 (this is the asterisk) and pch.cex = 1 (size of asterisk) and that should basically achieve the objective of showing asterisk for significant correlations instead of showing crosses for insignificant correlations. Hopefully it can be of use in the future!