先做个记录后面再改吧。
library(corrplot)
plotCorMat <- read.table('demo.txt', header = TRUE, row.names = 1, stringsAsFactors = FALSE)
rownames(plotCorMat) <- c("OS","HM2",
"BS",
"HI1",
"HI2",
"HAa",
"HAb",
"HAr")
colnames(plotCorMat) <- c("OS","HM2",
"BS",
"HI1",
"HI2",
"HAa",
"HAb",
"HAr")
pdf(file = "demo.pdf", width = 10, height = 9)
corrplot.mixed(as.matrix(plotCorMat),
lower = 'pie',
upper = 'circle',
tl.cex = 0.85,
cl.cex = 0.85,
diag="n",
tl.col="black",
upper.col = c("#4f953b", "#56A902", "#77C034", "#8CD790","#C388FE", "#791E94", "#001219","#9B2226", "#AE2021", "#BB3E03", "#CA6702", "#90e0ef", "#0077b6", "#023e8a"),
lower.col = c("#C388FE", "#791E94", "#001219", "#9B2226","#AE2021", "#BB3E03", "#CA6702", "#90e0ef", "#0077b6", "#023e8a","#4f953b", "#56A902", "#77C034", "#8CD790"))
dev.off()