将地块保存为pdf失败 [英] saving plots to pdf fails

查看:95
本文介绍了将地块保存为pdf失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用pdf("somefile.pdf")将绘图保存到pdf文件时,一切似乎都可以正常工作.没有错误消息或任何其他信息.结果仍然是搞砸了(文件大小不是0 KB),但是我无法使用预览或Adobe Reader打开它.我正在运行Mac OS 10.6和最新的R Studio版本.有什么建议?注意png()可以很好地工作,从ggplot进行的扫描和pdf图也可以.

When I use pdf("somefile.pdf") to save my plots to a pdf file, everything seems to work. No error messages or whatsoever. Still the result is screwed (file size is NOT 0 KB) but I can't open it using preview nor adobe reader. I am running Mac OS 10.6 and the latest R Studio release. Any suggestions? Note png()works perfectly fine, so does sweave and pdf plots from ggplot.

推荐答案

您是否记得在尝试查看文件之前通过dev.off()关闭了文件?

Did you remember to close the file via dev.off() before trying to view it?

(另请参见:使用ggplot2在R中保存pdf文件的问题)

这篇关于将地块保存为pdf失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆