我使用以下的 R 代码,得到了一张非常好的 热力图
:
png( "test-8.png", width =800 , height =750 )
heatmap(1-cor(df),distfun=function(x){as.dist(x)},symm=F,Rowv=NULL, Colv=NULL)
dev.off()
但是它的分辨率相当低。经过谷歌搜索,我找到了可能的解决方案:
png( "test-8.png", width =800 , height =750,res=600 )
heatmap(1-cor(df),distfun=function(x){as.dist(x)},symm=F,Rowv=NULL, Colv=NULL)
dev.off()
很不幸,代码执行后我收到了错误信息:
Error in par(op) : invalid value specified for graphical parameter "pin"
Calls: heatmap -> par
Execution halted
我该如何管理它?任何建议都将不胜感激。