1

我有一个绘制的 acorrplot并且我希望它具有 .eps 文件格式。问题是在 .eps 文件中,圆圈内的数字消失了。有什么参数可以让他们回来吗?

library(corrplot)
test <- structure(c(100, 41.6411042944785, 69.6478873239437, 99.35956084172, 
 100, 99.9295774647887, 90.4849039341263, 54.409509202454, 100
 ), .Dim = c(3L, 3L), .Dimnames = list(c("x1", "x2", "x3"), c("x1", 
 "x2", "x3")))

没有 .eps 格式:(表现良好)

corrplot(round(test),tl.cex=1.5,title="test", method="circle",is.corr=FALSE,type="full",
    cl.lim=c(0,100),cl.cex=2,addgrid.col="blue",addshade="positive",col=col1, addCoef.col = rgb(0,0,0, alpha =0.6), mar=c(0,0,1,0), diag= FALSE)

.eps 格式:

postscript("test.eps", height=8, width=8, paper="special", family="Helvetica", fonts="Helvetica", horizontal=FALSE, onefile=FALSE)
corrplot(round(test),tl.cex=1.5,title="test", method="circle",is.corr=FALSE,type="full",
         cl.lim=c(0,100),cl.cex=2,addgrid.col="blue",addshade="positive",col=col1, addCoef.col = rgb(0,0,0, alpha =0.6), mar=c(0,0,1,0), diag= FALSE)
dev.off()
4

1 回答 1

1

你看到警告说

警告消息:在 text.default(Pos[, 1], Pos[, 2], col = addCoef.col, labels = round((DAT - :此设备不支持半透明:每页只报告一次

? 这意味着您尝试以半透明方式绘制的任何颜色(提示,提示:参数中的alpha设置addCoef.col)在 PostScript 图中都不起作用。

消除alpha如下设置(只是将颜色从 更改rgb(0,0,0,alpha=0.6)rgb(0,0,0),尽管您不妨说"black")在我的系统上工作正常:

library("corrplot")
col1 <- "green"  ## you didn't tell us what col1 was so I made something up
postscript("test.eps", height=8, width=8, paper="special",
    family="Helvetica", fonts="Helvetica", horizontal=FALSE, onefile=FALSE)
corrplot(round(test),tl.cex=1.5,title="test", method="circle",
    is.corr=FALSE,type="full",
    cl.lim=c(0,100),cl.cex=2,
    addgrid.col="blue",addshade="positive",
    col=col1, addCoef.col = rgb(0,0,0), mar=c(0,0,1,0), diag= FALSE)
dev.off()
于 2013-02-28T15:14:40.563 回答