找回密码
 注册
查看: 2956|回复: 0

R语言:cairo()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 18:52:12 | 显示全部楼层 |阅读模式
cairo(grDevices)
cairo()所属R语言包:grDevices

                                        Cairo-based SVG, PDF and PostScript Graphics Devices
                                         开罗基于SVG的PDF和PostScript图形设备

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Graphics devices for SVG, PDF and PostScript graphics files.
为SVG,PDF和PostScript图形文件的图形设备。


用法----------Usage----------


svg(filename = if(onefile) "Rplots.svg" else "Rplot%03d.svg",
    width = 7, height = 7, pointsize = 12,
    onefile = FALSE, family = "sans", bg = "white",
    antialias = c("default", "none", "gray", "subpixel"))

cairo_pdf(filename = if(onefile) "Rplots.pdf" else "Rplot%03d.pdf",
          width = 7, height = 7, pointsize = 12,
          onefile = FALSE, family = "sans", bg = "white",
          antialias = c("default", "none", "gray", "subpixel"))

cairo_ps(filename = if(onefile) "Rplots.ps" else "Rplot%03d.ps",
         width = 7, height = 7, pointsize = 12,
         onefile = FALSE, family = "sans", bg = "white",
         antialias = c("default", "none", "gray", "subpixel"))



参数----------Arguments----------

参数:filename
the name of the output file. The page number is substituted if a C integer format is included in the character string, as in the default.  (The result must be less than PATH_MAX characters long, and may be truncated if not. See postscript for further details.)  Tilde expansion is performed where supported by the platform.
输出文件的名称。页码被替换,如果在字符串中包含一个C整数格式,在默认。 (结果必须是不到PATH_MAX字符长,如果没有可能会被截断。见postscript为进一步的细节。)TILDE扩大执行平台的支持。


参数:width
the width of the device in inches.
英寸宽的设备。


参数:height
the height of the device in inches.
英寸高的设备。


参数:pointsize
the default pointsize of plotted text (in big points).
绘制文本的默认的pointsize(大点)。


参数:onefile
should all plots appear in one file or in separate files?
所有图应该出现在一个文件中或在单独的文件?


参数:family
one of the device-independent font families, "sans", "serif" and "mono", or a character string specify a font family to be searched for in a system-dependent way.  
与设备无关的字体家庭之一,"sans","serif"和"mono",或一个字符串指定要搜索的字体家族系统依赖的方式。


参数:bg
the initial background colour: can be overridden by setting par("bg").
初始背景颜色:可以通过设置标准杆(“BG”)重写。


参数:antialias
string, the type of anti-aliasing (if any) to be used; defaults to "default".
字符串,抗锯齿的类型(如果要使用的话);默认"default"。


Details

详情----------Details----------

SVG (Scalar Vector Graphics) is a W3C standard for vector graphics. See http://www.w3.org/Graphics/SVG/.  The output is SVG version 1.1 for onefile = FALSE (the default), otherwise SVG 1.2.  (Very few SVG viewers are capable of displaying multi-page SVG files.)  Although this only requires cairo >= 1.2, the output produced by cairo 1.2.4 (in Centos/RHEL 5) is incorrect.
SVG(标量的矢量图形)是W3C标准的矢量图形。看到http://www.w3.org/Graphics/SVG/。输出的SVG 1.1版onefile = FALSE(默认),否则的SVG 1.2。 (SVG的观众很少能够显示多页的SVG文件。)虽然这仅需要开罗> = 1.2,由开罗1.2.4(在CentOS / RHEL 5中)产生的输出是不正确的。

Note that unlike postscript and pdf, cairo_pdf and cairo_ps sometimes record bitmaps and not vector graphics: a resolution of 72dpi is used.  On the other hand, they can (on suitable platforms) include a much wider range of UTF-8 glyphs, and embed the fonts used.
请注意,不像postscript和pdf,cairo_pdf和cairo_ps有时记录的位图和矢量图形:72dpi的分辨率使用。另一方面,他们可以(在适当的平台)包括范围更广的UTF-8字形,并嵌入使用的字体。

The output produced by cairo_ps(onefile = FALSE) will be encapsulated postscript on a platform with cairo >= 1.6.
cairo_ps(onefile = FALSE)产生的输出将被封装在开罗与平台> = 1.6的PostScript。

R can be compiled without support for any of these devices: this will be reported if you attempt to use them on a system where they are not supported.  They all require cairo version 1.2 or later.
R可编译时没有任何这些设备的支持:如果您尝试使用上不支持他们的系统,这将上报。他们都需要开罗1.2或更高版本。

If you plot more than one page on one of these devices and do not include something like %d for the sequence number in file (or set onefile=TRUE) the file will contain the last page plotted.
如果你图这些设备上的多个页面,不包括一些像%dfile(或一组onefile=TRUE),该文件将包含绘制的最后一页的序列号。

There is full support of transparency, but using this is one of the things liable to trigger bitmap output (and will always do so for cairo_ps).
有透明度的全力支持,但使用这个点阵图输出可触发的事情之一(将永远做cairo_ps)。


值----------Value----------

A plot device is opened: nothing is returned to the R interpreter.
剧情设备被打开:没有返回到R解释。


抗锯齿----------Anti-aliasing----------

Anti-aliasing is applied to both graphics and fonts.  It is generally preferable for lines and text, but can lead to undesirable effects for fills, e.g. for image plots, and so is never used for fills.
抗锯齿应用于图形和字体。它通常是可取的线条和文字,但可导致填充的不良影响,例如: image图,永远不会用于填补。

antialias = "default" is in principle platform-dependent, but seems most often equivalent to antialias = "gray".
antialias = "default"在原则上是依赖于平台的,但似乎最经常相当于antialias = "gray"。


公约----------Conventions----------

This section describes the implementation of the conventions for graphics devices set out in the “R Internals Manual”.
本节介绍的“R内部手册”所载的图形设备的公约的执引号况。

The default device size is in pixels (svg) or inches.
默认设备的大小是像素(svg)或英寸。

Font sizes are in big points.
字体大小大点。

The default font family is Helvetica.
默认字体是黑体。

Line widths are multiples of 1/96 inch.
线的宽度是1/96英寸的倍数。

Circle radii have a minimum of 1/72 inch.
圆半径至少有1/72英寸。

Colours are interpreted by the viewing application.
颜色被解释通过查看应用程序。


参见----------See Also----------

Devices, dev.print, pdf, postscript
Devices,dev.print,pdf,postscript

capabilities to see if cairo is supported.
capabilities看看开罗支持。

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-24 05:13 , Processed in 0.048668 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表