如何在基础 R 中更改绘图的分辨率?


在基础 R 中,我们可以将一个绘图保存为 png,并在同一阶段传递分辨率。此过程是使用 res 参数创建具有分辨率的 png 图像,然后创建绘图并使用 dev.off() 创建文件。查看以下示例以了解其工作原理。

示例 1

实时演示

> png(file="example1.png",res=100)
> plot(1:10)
> dev.off()

输出


Explore our latest online courses and learn new skills at your own pace. Enroll and become a certified expert to boost your career.

示例 2

实时演示

> png(file="example2.png",res=200)
> plot(1:10)
> dev.off()

输出

更新时间:06-11-2020

3K+ 次观看

开始你的 职业生涯

通过完成课程获得认证

开始
广告