全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
2288 1
2017-05-24
我想要导出固定分辨率的图片,图片大小和分辨率大小之间如何调整呢?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2017-5-25 19:59:43
自己指定图片大小和图片分辨率都没问题。至于大小和分辨率怎么搭配的话,你得自己去了解下。这个是 R Graphic Cookbook里介绍图片输出的片段:
You can specify a number of arguments to adjust the graph as per your needs. The simplest
one that we've already used is the filename. You can also adjust the height and width settings
of the graph:
    png("scatterplot.png",
    height=600,
    width=600)
The default units for height and width are pixels but you can also specify the units in inches, cm or mm:
    png("scatterplot.png",
    height=4,
    width=4,
    units="in")
The resolution of the saved image can be specified in dots per inch (dpi) using the
res argument:
    png("scatterplot.png",
    res=600)
If you want your graphs saved in a vector format, you can also save them as a PDF file usingthe pdf() function:
    pdf("scatterplot.pdf")
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群