简体   繁体   English

R中没有边框/边框的PNG图片?

[英]PNG image without border/frame in R?

I am trying to produce a png file that has no black frame around. 我试图产生一个没有黑框的png文件。 I know how it works with the plot command, but I cannot find any solution using png() or image(). 我知道它如何与plot命令一起工作,但是我找不到使用png()或image()的解决方案。 These are the command lines of concern: 这些是需要关注的命令行:

png(filename = paste(outDir,"/PRCP",yy0,mm0,dd0,"+",sprintf("%03.0f",(lt*6)),"h_temp.png",sep=""), width = (dPm[2]), height = (dPm[1]), bg = "transparent")
par(mai=c(0,0,0,0))
image(Dem[,dPm[1]:1],col=grey((13:0)/15),useRaster = TRUE, add = FALSE,zlim=range(Dem,na.rm=TRUE))
dev.off()

Has anybody an advice? 有没有人建议?

ok, after trying many many different options (unsuccessful), I finally found it out. 好的,在尝试了许多不同的选项(不成功)之后,我终于找到了答案。 If you use image(), then you have to put axes=FALSE in order to not get a frame 如果使用image(),则必须放置axis = FALSE才能获得框架

PS: thanks for all the help offered! PS:感谢您提供的所有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM