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

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

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

                                        PostScript Graphics
                                         PostScript图形

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

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

postscript starts the graphics device driver for producing PostScript graphics.
postscript开始生产PostScript图形的图形设备驱动程序。


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


postscript(file = ifelse(onefile, "Rplots.ps", "Rplot%03d.ps"),
           onefile, family, title, fonts, encoding, bg, fg,
           width, height, horizontal, pointsize,
           paper, pagecentre, print.it, command,
           colormodel, useKerning, fillOddEven)



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

参数:file
a character string giving the name of the file.  If it is "", the output is piped to the command given by the argument command.  For use with onefile = FALSE give a printf format such as "Rplot%03d.ps" (the default in that case).  The string should not otherwise contain a %: if it is really necessary, use %% in the string for % in the file name. A single integer format matching the regular expression "%[#0 +=-]*[0-9.]*[diouxX]" is allowed.  Tilde expansion (see path.expand) is done.  
给文件名字符串。如果是"",输出管道参数command命令。一起使用onefile = FALSE给printf格式如"Rplot%03d.ps"(在这种情况下默认)。否则该字符串不应该包含一个%:如果真的是必要的,使用%%字符串中的%在文件名。一个单一的整数格式相匹配的正则表达式"%[#0 +=-]*[0-9.]*[diouxX]"允许。 TILDE扩张(见path.expand)完成。


参数:onefile
logical: if true (the default) allow multiple figures in one file.  If false, generate a file name containing the page number for each page and use an EPSF header and no DocumentMedia comment.  Defaults to the TRUE.
逻辑:如果为true(默认),允许在一个文件中的多个数字。如果为false,生成一个文件名,包含每一页的页码和使用EPSF头和没有DocumentMedia评论。默认TRUE。


参数:family
the initial font family to be used, normally as a character string.  See the section "Families".  Defaults to "Helvetica".
最初的字体家族使用,通常作为一个字符串。见一节“家庭”。 "Helvetica"默认。


参数:title
title string to embed as the Title comment in the file.  Defaults to "R Graphics Output".
标题字符串嵌入Title文件中的注释。 "R Graphics Output"默认。


参数:fonts
a character vector specifying additional R graphics font family names for font families whose declarations will be included in the PostScript file and are available for use with the device. See "Families" below.  Defaults to NULL.
指定进一步的开发图形字体姓氏字体家庭的声明将包括一个字符向量PostScript文件和设备使用。请参阅下面的“家庭”。 NULL默认。


参数:encoding
the name of an encoding file.  Defaults to "default".  The latter is interpreted as ""CP1250.enc"" (Central European), "CP1251.enc" (Cyrillic), "CP1253.enc" (Greek) or "CP1257.enc" (Baltic) if one of those codepages is in use, otherwise ""WinAnsi.enc"" (codepage 1252). The file is looked for in the "enc" directory of package grDevices if the path does not contain a path separator.  An extension ".enc" can be omitted.  
编码文件的名称。 "default"默认。后者被解释为"CP1250.enc"(中欧),"CP1251.enc"(西里尔文),"CP1253.enc"(希腊)或"CP1257.enc"(波罗的海),如果一个人的codepages在使用,否则"WinAnsi.enc"(代码页1252)。该文件是看在enc包目录grDevices如果路径不包含路径分隔符。一个扩展".enc"可以省略。


参数:bg
the initial background color to be used.  If "transparent" (or any other non-opaque colour), no background is painted.  Defaults to "transparent".
要使用的初始背景颜色。如果"transparent"(或任何其他非不透明的颜色),没有任何背景画。 "transparent"默认。


参数:fg
the initial foreground color to be used.  Defaults to "black".
要使用的初始前景色。 "black"默认。


参数:width, height
the width and height of the graphics region in inches.  Default to 0.  If paper != "special" and width or height is less than 0.1 or too large to give a total margin of 0.5 inch, the graphics region is reset to the corresponding paper dimension minus 0.5.  
英寸图形区域的宽度和高度。默认0。如果paper != "special"和width或height是0.1或过大,给一个0.5英寸的总保证金少,图形区域重置为相应的纸张尺寸减去0.5 。


参数:horizontal
the orientation of the printed image, a logical. Defaults to true, that is landscape orientation on paper sizes with width less than height.
打印图像的方向,一个逻辑。默认为true,这是景观上的纸张尺寸与宽度比高度取向。


参数:pointsize
the default point size to be used.  Strictly speaking, in bp, that is 1/72 of an inch, but approximately in points.  Defaults to 12.
要使用默认的点大小。严格地说,在BP,即1/72英寸,但约在点。 12默认。


参数:paper
the size of paper in the printer.  The choices are "a4", "letter" (or "us"), "legal" and "executive" (and these can be capitalized). Also, "special" can be used, when arguments width and height specify the paper size.  A further choice is "default" (the default): If this is selected, the papersize is taken from the option "papersize" if that is set and to "a4" if it is unset or empty.
在打印机的纸张大小。选择"a4","letter"(或"us")"legal"和"executive"(和这些可以被资本化)。此外,"special"可以用来当论据width和height指定的纸张尺寸。进一步的选择是"default"(默认):如果选择此选项,纸张大小从选项"papersize"如果设置为"a4"如果是没有设置或者为空。


参数:pagecentre
logical: should the device region be centred on the page?  Defaults to true.
逻辑:应在页面上为中心的设备区域?默认为true。


参数:print.it
logical: should the file be printed when the device is closed?  (This only applies if file is a real file name.) Defaults to false.
逻辑:设备被关闭时,应该文件被打印? (这仅适用file如果是一个真正的文件名。)默认为false。


参数:command
the command to be used for "printing".  Defaults to "default", the value of option "printcmd".  The length limit is 2*PATH_MAX, 520 bytes.  
用于“印刷”的命令。 "default"默认,选项"printcmd"的价值。长度限制是2*PATH_MAX,520个字节。


参数:colormodel
a character string describing the color model: currently allowed values as "srgb", "srgb+gray", "rgb", "rgb-nogray", "gray" (or "grey") and "cmyk".  Defaults to "srgb".  See section "Color models".
字符串描述颜色模型:"srgb","srgb+gray","rgb","rgb-nogray","gray"(或"grey")和目前允许值"cmyk"。默认为"srgb"。节“颜色模式”。


参数:useKerning
logical.  Should kerning corrections be included in setting text and calculating string widths?  Defaults to TRUE.
逻辑。字距更正应列入设置文本和字符串宽度计算? TRUE默认。


参数:fillOddEven
logical controlling the polygon fill mode:  see polygon for details.  Default FALSE.     
逻辑控制的多边形填充模式:看到polygon详情。默认FALSE。


Details

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

All arguments except file default to values given by ps.options().  The ultimate defaults are quoted in the arguments section.
除了file默认ps.options()给定值的所有参数。最终默认被引用的论据部分。

postscript opens the file file and the PostScript commands needed to plot any graphics requested are written to that file.  This file can then be printed on a suitable device to obtain hard copy.
postscript打开文件“file和绘制任何图形要求所需的PostScript命令写入该文件。这个文件可以被印在一个合适的设备以获取硬拷贝。

The file argument is interpreted as a C integer format as used by sprintf, with integer argument the page number. The default gives files "Rplot001.ps", ..., "Rplot999.ps", "Rplot1000.ps", ....
file参数被解释为一个C整数格式由sprintf整数参数,页码。默认给文件Rplot001.ps,Rplot999.ps,Rplot1000.ps,....

The postscript produced for a single R plot is EPS (Encapsulated PostScript) compatible, and can be included into other documents, e.g., into LaTeX, using \includegraphics{<filename>}.  For use in this way you will probably want to use setEPS() to set the defaults as horizontal = FALSE, onefile = FALSE, paper =     "special".  Note that the bounding box is for the device region: if you find the white space around the plot region excessive, reduce the margins of the figure region via par(mar=).
PostScript是一个单一的R图产生的EPS(封装的PostScript)兼容,并可以包含到其他文件,如乳胶,使用\includegraphics{<filename>}的。对于使用这种方式,你可能会想使用setEPS()设置为horizontal = FALSE, onefile = FALSE, paper =     "special"默认。注意边界框设备的区域是:如果你发现周围的图区域的空白过多,减少通过par(mar=)图区域的边缘。

Most of the PostScript prologue used is taken from the R character vector .ps.prolog.  This is marked in the output, and can be changed by changing that vector.  (This is only advisable for PostScript experts: the standard version is in namespace:grDevices.)
使用的PostScript序幕最重要的是从R字符向量.ps.prolog。这标志着输出,可以通过改变这种向量的改变。 (这是只为PostScript专家建议:标准版是在namespace:grDevices。)

A PostScript device has a default family, which can be set by the user via family.  If other font families are to be used when drawing to the PostScript device, these must be declared when the device is created via fonts;  the font family names for this argument are R graphics font family names (see the documentation for postscriptFonts).
PostScript设备有一个默认的家庭,可以由用户设置,通过family。如果绘制PostScript设备时,要使用其他字体家庭,这些设备时,必须声明,通过fonts;这种说法的字体家族名是R图形字体家族名称(见文件 postscriptFonts)。

Line widths as controlled by par(lwd=) are in multiples of 1/96 inch: multiples less than 1 are allowed.  pch="." with cex = 1 corresponds to a square of side 1/72 inch, which is also the "pixel" size assumed for graphics parameters such as "cra".
线控制宽度par(lwd=)1/96英寸的倍数:倍数小于1。 pch="."用cex = 1对应到1/72英寸,这也是“像素大小图形参数,如"cra"假设边的平方。

When the background colour is fully transparent (as is the initial default value), the PostScript produced does not paint the background. Almost all PostScript viewers will use a white canvas so the visual effect is if the background were white.  This will not be the case when printing onto coloured paper, though.
当背景颜色是完全透明的(是初始默认值),产生的PostScript不画背景。几乎所有PostScript观众将使用白色画布,所以视觉效果,如果背景是白色的。这会不会是到彩色纸打印时,虽然。


家庭----------Families----------

Font families are collections of fonts covering the five font faces, (conventionally plain, bold, italic, bold-italic and symbol) selected by the graphics parameter par(font=) or the grid parameter gpar(fontface=).  Font families can be specified either as an an initial/default font family for the device via the family argument or after the device is opened by the graphics parameter par(family=) or the grid parameter gpar(fontfamily=).  Families which will be used in addition to the initial family must be specified in the fonts argument when the device is opened.
字体家庭是涵盖五种字体(常规平原,粗体,斜体,粗体斜体和符号)的图形参数par(font=)或电网参数gpar(fontface=)选择字体的集合。字体家庭可以被指定为一个初始/默认字体家庭设备可以通过family参数或设备的图形参数par(family=)或电网参数gpar(fontfamily=)打开后。除了最初的家庭将被用于家庭,必须指定在fonts参数,当设备被打开。

Font families are declared via a call to postscriptFonts.
字体家庭宣布调用postscriptFonts通过。

The argument family specifies the initial/default font family to be used.  In normal use it is one of "AvantGarde", "Bookman", "Courier", "Helvetica", "Helvetica-Narrow", "NewCenturySchoolbook", "Palatino" or "Times", and refers to the standard Adobe PostScript fonts families of those names which are included (or cloned) in all common PostScript devices.
参数family指定要使用的初始/默认字体家族。在正常使用的,它是一个"AvantGarde","Bookman","Courier","Helvetica","Helvetica-Narrow","NewCenturySchoolbook","Palatino"或 "Times",是指标准的Adobe PostScript字体的名称,包括所有常见的PostScript设备(或克隆)的家庭。

Many PostScript emulators (including those based on ghostscript) use the URW equivalents of these fonts, which are "URWGothic", "URWBookman", "NimbusMon", "NimbusSan", "NimbusSanCond", "CenturySch", "URWPalladio" and "NimbusRom" respectively.  If your PostScript device is using URW fonts, you will obtain access to more characters and more appropriate metrics by using these names.  To make these easier to remember, "URWHelvetica" == "NimbusSan" and "URWTimes" == "NimbusRom" are also supported.
许多PostScript模拟器(包括那些基于对ghostscript)使用这些字体了URW等值,这是"URWGothic","URWBookman","NimbusMon","NimbusSan","NimbusSanCond","CenturySch","URWPalladio"和"NimbusRom"。如果您的PostScript设备使用URW字体,您将获得使用这些名称获得更多的人物和更合适的指标。为了使这些容易记住,"URWHelvetica" == "NimbusSan"和"URWTimes" == "NimbusRom"也支持。

Another type of family makes use of CID-keyed fonts for East Asian languages &ndash; see postscriptFonts.
另一种类型的家庭使用CID键控字体为东亚语言 - 看到postscriptFonts。

The family argument is normally a character string naming a font family, but family objects generated by Type1Font and CIDFont are also accepted.  For compatibility with earlier versions of R, the initial family can also be specified as a vector of four or five afm files.
family参数通常是一个字符串命名字体的家庭,但产生Type1Font和CIDFont也接受家庭对象。 R的早期版本的兼容性,最初的家庭也可以被指定为向量四五AFM文件。

Note that R does not embed the font(s) used in the PostScript output: see embedFonts for a utility to help do so.
注意的R并不在PostScript输出中使用嵌入字体(S):embedFonts这样做的一个实用工具,以帮助。

Viewers and embedding applications frequently substitute fonts for those specified in the family, and the substitute will often have slightly different font metrics. useKerning=TRUE spaces the letters in the string using kerning corrections for the intended family: this may look uglier than useKerning=FALSE.
观众和嵌入式应用经常代替那些在家庭中指定的字体,替代往往会略有不同的字体度量。 useKerning=TRUE空间中使用字距更正为目的的家庭的字符串的字母:这可能看起来比useKerning=FALSE丑陋。


编码----------Encodings----------

Encodings describe which glyphs are used to display the character codes (in the range 0&ndash;255).  Most commonly R uses ISOLatin1 encoding, and the examples for text are in that encoding.  However, the encoding used on machines running R may well be different, and by using the encoding argument the glyphs can be matched to encoding in use.  This suffices for European and Cyrillic languages, but not for CJK languages.  For the latter, composite CID fonts are used.  These fonts are useful for other languages: for example they may contain Greek glyphs. (The rest of this section applies only when CID fonts are not used.)
编码描述字形用于显示的字符代码(在0-255范围内)。最常用的R使用ISOLatin1编码,的text该编码的例子。然而,在运行R的机器使用的编码方式可能有所不同,字形可以使用encoding参数匹配中使用的编码。欧洲和斯拉夫语言,但不适用于中日韩语言这就够了。对于后者,用于复合CID字体。这些字体是有用的其他语言,例如,他们可能包含希腊字形。 (本节的其余部分适用于只当不使用CID字体。)

None of this will matter if only ASCII characters (codes 32&ndash;126) are used as all the encodings (except "TeXtext") agree over that range.  Some encodings are supersets of ISOLatin1, too.  However, if accented and special characters do not come out as you expect, you may need to change the encoding.  Some other encodings are supplied with R: "WinAnsi.enc" and "MacRoman.enc" correspond to the encodings normally used on Windows and Classic Mac OS (at least by Adobe), and "PDFDoc.enc" is the first 256 characters of the Unicode encoding, the standard for PDF.  There are also encodings "ISOLatin2.enc", "CP1250.enc", "ISOLatin7.enc" (ISO 8859-13), "CP1257.enc", and "ISOLatin9.enc" (ISO 8859-15), "Cyrillic.enc" (ISO 8859-5), "KOI8-R.enc", "KOI8-U.enc", "CP1251.enc", "Greek.enc" (ISO 8859-7) and "CP1253.enc".  Note that many glyphs in these encodings are not in the fonts corresponding to the standard families. (The Adobe ones for all but Courier, Helvetica and Times cover little more than Latin-1, whereas the URW ones also cover Latin-2, Latin-7, Latin-9 and Cyrillic but no Greek.  The Adobe exceptions cover the Latin character sets, but not the Euro.)
如果没有这个重要的ASCII字符(代码32-126)使用所有的编码(除"TeXtext")同意超过这个范围。一些编码的超集,是ISOLatin1的。然而,如果重音和特殊字符不出来像您期望的那样,你可能需要改变编码。提供一些其他的编码与R:"WinAnsi.enc"和"MacRoman.enc"对应的编码通常用于在Windows和经典的Mac OS(至少由Adobe),"PDFDoc.enc"是第256个字符Unicode编码,为PDF格式的标准。也有是编码"ISOLatin2.enc","CP1250.enc","ISOLatin7.enc"(ISO 8859-13),"CP1257.enc","ISOLatin9.enc"(ISO 8859-15),<X >(ISO 8859-5),"Cyrillic.enc","KOI8-R.enc","KOI8-U.enc","CP1251.enc"(8859-7的ISO)和"Greek.enc"。请注意,许多字形在这些编码没有相应标准的家庭在字体。 (但快递;的,Helvetica和时代覆盖比Latin-1的更小,而了URW的还包括拉丁-2,拉丁美洲,拉丁美洲7-9和西里尔但没有希腊的Adobe例外包括拉丁字符套,而不是欧元。)

If you specify the encoding, it is your responsibility to ensure that the PostScript font contains the glyphs used.  One issue here is the Euro symbol which is in the WinAnsi and MacRoman encodings but may well not be in the PostScript fonts.  (It is in the URW variants; it is not in the supplied Adobe Font Metric files.)
如果你指定的编码,这是你的责任,以确保PostScript字体包含使用的字形。一个问题是欧元符号是在WinAnsi的MacRoman编码,但可能不是在PostScript字体。 (这是中了URW变种,它不是在随机提供的Adobe字体的度量文件。)

There is an exception.  Character 45 ("-") is always set as minus (its value in Adobe ISOLatin1) even though it is hyphen in the other encodings.  Hyphen is available as character 173 (octal 0255) in all the Latin encodings, Cyrillic and Greek.  (This can be entered as "\uad" in a UTF-8 locale.)  There are some discrepancies in accounts of glyphs 39 and 96: the supplied encodings (except CP1250 and CP1251) treat these as "quoteright" and "quoteleft" (rather than "quotesingle"/"acute" and "grave" respectively), as they are in the Adobe documentation.
有一个例外。字符45("-")总是减去(在Adobe ISOLatin1的值),设置,即使它是在其他编码的连字符。连字符是在所有拉丁美洲的编码,西里尔和希腊为173字符(八进制0255)。 (这可以输入"\uad"在UTF-8语言环境。)字形39和96的帐户中有一些差异:提供的编码(cp1250和CP1251除外)当作“quoteright”,这些“ quoteleft“(而非”quotesingle/急性和严重),因为他们是在Adobe文件。


TeX字体----------TeX fonts----------

TeX has traditionally made use of fonts such as Computer Modern which are encoded rather differently, in a 7-bit encoding.  This encoding can be specified by encoding = "TeXtext.enc", taking care that the ASCII characters < > \ _ { } are not available in those fonts.
TeX的传统利用现代计算机编码而不同,在7位编码,如字体。这种编码方式可以指定encoding = "TeXtext.enc",照顾ASCII字符< > \ _ { }不提供这些字体。

There are supplied families "ComputerModern" and "ComputerModernItalic" which use this encoding, and which are only supported for postscript (and not pdf).  They are intended to use with the Type 1 versions of the TeX CM fonts.  It will normally be possible to include such output in TeX or LaTeX provided it is processed with dvips -Ppfb -j0 or the equivalent on your system. (-j0 turns off font subsetting.)  When family =     "ComputerModern" is used, the italic/bold-italic fonts used are slanted fonts (cmsl10 and cmbxsl10).  To use text italic fonts instead, set family = "ComputerModernItalic".
有提供家庭"ComputerModern"和"ComputerModernItalic"使用这种编码,只支持postscript(而不是pdf)。他们的目的是用TeX的CM字体类型1版本。它通常会可能包括这样的输出TeX或LaTeX提供的,它是用dvips -Ppfb -j0处理或相当于您的系统上。 (-j0关闭字体子集。)当family =     "ComputerModern"使用,使用斜体/粗体斜体字体倾斜字体(cmsl10和cmbxsl10)。而不是使用斜体字体,设置family = "ComputerModernItalic"。

These families use the TeX math italic and  symbol fonts for a comprehensive but incomplete coverage of the glyphs covered by the Adobe symbol font in other families.  This is achieved by special-casing the postscript code generated from the supplied "CM_symbol_10.afm".
为全面涵盖其他家庭的Adobe符号字体字形,但不完全覆盖,这些家庭使用的TeX数学斜体和符号字体。这是通过特殊的套管从提供的CM_symbol_10.afm产生的PostScript代码。


颜色模型----------Color models----------

The default color model ("srgb") is sRGB.
默认的颜色模型("srgb")是sRGB。

The alternative "srgb+gray" uses sRGB for colors, but with pure gray colors (including black and white) expressed as greyscales (which results in smaller files and can be advantageous with some printer drivers).  Conversely, its files can be rendered much slower on some viewers, and there can be a noticeable discontinuity in color gradients involving gray or white.
替代"srgb+gray"使用颜色的sRGB,但与纯灰色(包括黑色和白色)表示为greyscales(这会导致更小的文件,并可以与某些打印机驱动程序的优势)。相反,它的文件可以被渲染一些观众要慢得多,并且可以有明显的不连续性,涉及灰色或白色在颜色渐变。

Other possibilities are "gray" (or "grey") which used only greyscales (and converts other colours to a luminance), and "cmyk".  The simplest possible conversion from sRGB to CMYK is used (http://en.wikipedia.org/wiki/CMYK_color_model#Mapping_RGB_to_CMYK), and raster images are output in RGB.
其他可能性"gray"(或"grey")只greyscales(以及其他颜色转换到亮度),"cmyk"。使用尽可能简单的sRGB到CMYK的转换(#Mapping_RGB_to_CMYK http://en.wikipedia.org/wiki/CMYK_color_model),光栅图像是RGB输出。

Color models provided for backwards compatibility are "rgb") (which is RGB+gray) and "rgb-nogray" which use uncalibrated RGB (as used in R prior to 2.13.0).  These result in slightly smaller files which may render faster, but do rely on the viewer being properly calibrated.
为了向后兼容提供的颜色模型是"rgb")(这是RGB +灰色)"rgb-nogray"使用未经校准的RGB(研发前2.13.0)。这些略小文件,这可能会导致更快,但不依赖于被正确校准观众的结果。


印刷----------Printing----------

A postscript plot can be printed via postscript in two ways.
通过postscript在两个方面,一个postscript图可以打印。

Setting print.it = TRUE causes the command given in argument command to be called with argument "file" when the device is closed.  Note that the plot file is not deleted unless command arranges to delete it.
设置print.it = TRUE导致在参数给定的命令command要带参数调用"file"当设备被关闭。请注意,该图的文件不会被删除,除非command安排将其删除。

file="" or file="|cmd" can be used to print using a pipe.  Failure to open the command will probably be reported to the terminal but not to R, in which case close the device by dev.off immediately.
file=""或file="|cmd"可以用来打印使用管道。未能打开命令可能会被报告到终端,而不是为R,在这种情况下dev.off立即关闭设备。

Only the first of these will work on Windows, and the default "printcmd" is empty and will give an error if print.it=TRUE is used.  Suitable commands to spool a PostScript file to a printer can be found in "RedMon" suite available from http://www.cs.wisc.edu/~ghost/index.html.  The command will be run in a minimized window.   GSView 4.x provides "gsprint.exe" which may be more convenient (it requires Ghostscript version 6.50 or later).
只有这些工作在Windows,默认的"printcmd"是空的,会给如果print.it=TRUE使用的错误。合适的命令后台打印到打印机的PostScript文件,可以发现“RedMon可从http://www.cs.wisc.edu/的套房&#12316;鬼/ index.html的。该命令将运行在一个最小化的窗口。 GSView程序4.X提供gsprint.exe这可能是更方便(需要Ghostscript的版本6.50或更高版本)。


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

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

The default device size is 7 inches square.
默认设备大小为7英寸见方。

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

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

Line widths are as a multiple of 1/96 inch, with a minimum of 0.01 enforced.   
线宽是多了1/96英寸的最低执行0.01。

Circle of any radius are allowed.
允许任何半径的圆。

Colours are by default specified as sRGB.
颜色是由指定的默认为sRGB。

At very small line widths, the line type may be forced to solid.
在非常小的线宽,线类型可能会被迫固体。

Raster images are currently limited to opaque colours.
目前只限于光栅图像不透明的颜色。


注意----------Note----------

If you see problems with postscript output, do remember that the problem is much more likely to be in your viewer than in R.  Try another viewer if possible.  Symptoms for which the viewer has been at fault are apparent grids on image plots (turn off graphics anti-aliasing in your viewer if you can) and missing or incorrect glyphs in text (viewers silently doing font substitution).
如果你看到PostScript输出的问题,千万要记得,这个问题是更可能比在R是在您的浏览器,如果可能的话,尝试使用其他浏览器。观众故障的症状有明显的网格影像图(关掉你的浏览器,如果你能在图形反走样)和文本中缺少或不正确的字形(观众默默地做字体替换)。

Unfortunately the default viewers on most Linux and Mac OS X systems have these problems, and no obvious way to turn off graphics anti-aliasing.
不幸的是,大多数Linux和Mac OS X系统的默认观众有这些问题,并没有明显的方式,关闭抗锯齿的图形。


作者(S)----------Author(s)----------



Support for Computer Modern fonts is based on a contribution by
Brian D'Urso <a href="mailto:durso@hussle.harvard.edu">durso@hussle.harvard.edu</a>.




参考文献----------References----------

The New S Language. Wadsworth &amp; Brooks/Cole.

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

postscriptFonts, Devices, and check.options which is called from both ps.options and postscript.
postscriptFonts,Devices,check.options呼吁双方ps.options和postscript。

cairo_ps for another device that can produce PostScript.
cairo_ps另一种设备,它可以产生的PostScript。

More details of font families and encodings and especially handling text in a non-Latin-1 encoding and embedding fonts can be found in
字体家庭和编码的更多细节,尤其是处理非Latin-1编码和嵌入字体的文本中可以找到

Paul Murrell and Brian Ripley (2006) Non-standard fonts in PostScript and PDF graphics. R News, 6(2):41&ndash;47. http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf.
保罗的Murrell和布赖恩·里普利(2006)非标字体,PostScript和PDF格式的图形。 &#341;新闻,6(2):41-47。 http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf。


举例----------Examples----------


require(graphics)
## Not run: [#无法运行:]
# open the file "foo.ps" for graphics output[打开文件的图形输出“foo.ps”]
postscript("foo.ps")
# produce the desired graph(s)[生产所需的图(S)]
dev.off()              # turn off the postscript device[关闭PostScript设备]
options(printcmd='redpr -P"\\markov\lw"')
postscript(file=tempfile("Rps."), print.it=TRUE)
# produce the desired graph(s)[生产所需的图(S)]
dev.off()              # send plot file to the printer[图形文件发送到打印机]
## alternative using GSView 4.x[#替代使用GSView程序4.X]
options(printcmd='/GhostGum/gsview/gsprint -query')

# for URW PostScript devices[URW PostScript设备]
postscript("foo.ps", family = "NimbusSan")

## for inclusion in Computer Modern TeX documents, perhaps[#列入现代计算机TeX文件,或许]
postscript("cm_test.eps", width = 4.0, height = 3.0,
           horizontal = FALSE, onefile = FALSE, paper = "special",
           family = "ComputerModern", encoding = "TeXtext.enc")
## The resultant postscript file can be used by dvips -Ppfb -j0.[#由此产生的PostScript文件,可以使用dvips或者Ppfb-J0。]

## To test out encodings, you can use[#为了测试,编码,可以使用]
TestChars <- function(encoding="ISOLatin1", family="URWHelvetica")
{
    postscript(encoding=encoding, family=family)
    par(pty="s")
    plot(c(-1,16), c(-1,16), type="n", xlab="", ylab="",
         xaxs="i", yaxs="i")
    title(paste("Centred chars in encoding", encoding))
    grid(17, 17, lty=1)
    for(i in c(32:255)) {
        x <- i %% 16
        y <- i %/% 16
        points(x, y, pch=i)
    }
    dev.off()
}
## there will be many warnings.  We use URW to get a complete enough[#会有很多的警告。我们使用URW得到一个完整的足够]
## set of font metrics.[#设置字体度量。]
TestChars()
TestChars("ISOLatin2")
TestChars("WinAnsi")

## End(Not run)[#结束(不运行)]


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-23 03:55 , Processed in 0.025840 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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