在 R 中保存雷达图

Posted

技术标签:

【中文标题】在 R 中保存雷达图【英文标题】:Save radar chart in R 【发布时间】:2020-11-02 08:53:42 【问题描述】:

我想保存雷达图但无法保存。下面是我的代码。

library(fmsb)
png(filename ="plt.png")
radarchart(g3, axistype=1,
           pcol=colors_border, 
           pfcol=colors_in,seg=4,
           plwd=3 ,plty =1,pty = 32,cglcol="grey", cglty=1, cglwd=1, vlcex=1,
           maxmin=TRUE, centerzero = T, 
           axislabcol="black",  vlabels = c("V1", "V2", "V3", "V4"))

但是,保存出来的图表是空白的。有人可以帮忙吗?

非常感谢!

【问题讨论】:

我们需要关闭png,最后加上dev.off() 【参考方案1】:

只需在 R 脚本末尾添加 dev.off() 即可。

【讨论】:

以上是关于在 R 中保存雷达图的主要内容,如果未能解决你的问题,请参考以下文章