Reputation: 1
The code I have written produces the image attached here. I'm wanting to make the asterisks smaller in size, but I am not sure how to do this. Also, is it possible to represent different levels of significance with the number of asterisks (*=0.1, **=0.05, ***=0.001). Thanks in advance. My code and figure are below as well.
alpha_corr <- cor(Schiller_Numerical, method = "pearson")
alpha_p <- cor.mtest(alpha_corr, method = "pearson", conf.level = 0.95, exact = FALSE)
corrplot(
cor(alpha_corr, method = "pearson"),
tl.col = "black",
tl.srt = 60,
method = 'square',
order = 'hclust',
type = 'lower',
diag = TRUE,
tl.cex = 1,
title = "Heatmap For All Data",
mar=c(0,0,2,0),
p.mat = alpha_p$p,
sig.level = 0.05,
insig = "label_sig") `
Upvotes: 0
Views: 65
Reputation: 1763
You can find all the useful parameters you required in the corrplot()
documentation : https://www.rdocumentation.org/packages/corrplot/versions/0.92/topics/corrplot
You need to modify pch.cex
to adjust asdterisk size, and sig.level
to specify the signficance levels as a vector.
data(mtcars)
alpha_p <- cor.mtest(mtcars, method = "pearson", conf.level = 0.95, exact = FALSE)
corrplot(
cor(mtcars, method = "pearson"),
tl.col = "black",
tl.srt = 60,
method = 'square',
order = 'hclust',
type = 'lower',
diag = TRUE,
tl.cex = 1,
title = "Heatmap For All Data",
mar=c(0,0,2,0),
p.mat = alpha_p$p,
sig.level = c(0.001,0.05,0.1),
insig = "label_sig",
pch.cex=1)
Upvotes: 1