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

R语言 Rpad包 RpadGraphing()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-27 23:39:54 | 显示全部楼层 |阅读模式
RpadGraphing(Rpad)
RpadGraphing()所属R语言包:Rpad

                                        Rpad graphing utilities
                                         RPAD图形实用程序

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

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

Utilities to make graphing in Rpad R scripts easier.
实用程序图形RPAD R脚本更容易。


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


  graphoptions(..., reset = FALSE, override.check = TRUE)
  newgraph(name = "", extension = graphoptions()$extension,
     type = graphoptions()$type, res = graphoptions()$res,
     width = graphoptions()$width, height = graphoptions()$height,
     deviceUsesPixels = graphoptions()$deviceUsesPixels,
     pointsize = graphoptions()$pointsize, sublines = graphoptions()$sublines,
     toplines = graphoptions()$toplines, ratio = graphoptions()$ratio,
     leftlines = graphoptions()$leftlines, lwd = graphoptions()$lwd, ...)
  showgraph(name = RpadPlotName(), link = FALSE, ...)
  RpadPlotName()



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

参数:reset, override.check
logical arguments passed to check.options.  
逻辑参数传递给check.options。


参数:name
is the name of the graph with the extension left OFF.
是具有扩展名的曲线图的名称离开关。


参数:extension
is the file extension of the device (typically '.png').
的设备是文件扩展名(通常为“PNG)。


参数:type
is the graphics device, either a ghostscript device as a character string, "Rpng" for R's builtin png device, or any R graphics device function. For a ghostscript device, common possibilities are "png256", "pngalpha" (the default), or "pdf".
的图形设备,无论是ghostscript的装置,作为一个字符的字符串,“Rpng”为R的内建png文件的移动设备,或任何R图形设备功能。的Ghostscript设备,常见的可能性是“png256”,“pngalpha”(默认值),或“PDF”。


参数:res
is the resolution of the bitmap in dots per inch.
分辨率是每英寸点数中的位图。


参数:width, height
are the dimensions of the graph in inches.
以英寸为单位的图形的尺寸。


参数:deviceUsesPixels
is a logical specifying whether the R graphics driver uses pixels. This only applies if type is used to specify an R graphics driver. It defaults to TRUE.
是一个逻辑,指定R图形驱动程序是否使用像素。这仅适用于type如果用于指定R图形驱动程序。它默认为TRUE。


参数:ratio
specifies the ratio of the graph if either the width or height is not specified.
指定的比例的曲线图,如果未指定的宽度或高度。


参数:pointsize
is the font point size passed to the postscript device.
是的字体大小传递到PostScript设备。


参数:sublines, toplines, leftlines
specify the dimension of the graph along with the outside border. It defaults to fairly tight outside dimensions.
指定的尺寸的曲线图,以及与外部的边界。它默认为相当紧张的外部尺寸。


参数:lwd
is the line width set with par.
线的宽度设置par。


参数:link
is a logical specifying whether to show a link to allow the user to download an EPS file of the graph (not available when using R's png driver.
是逻辑指定是否显示的链接,以允许用户下载EPS文件中的曲线图(未用时,使用R的png文件驱动。


参数:...
in fspdf and newgraph, arguments are passed to postscript. In graphoptions, the arguments are assigned as defaults for newgraph.
在fspdf和newgraph,参数被传递给postscript。在graphoptions,参数被指定为默认值newgraph。


Details

详细信息----------Details----------

The graphoptions, newgraph, and showgraph set of functions allows quick setup and display of web-friendly graphics. The user can normally just use any of the plot commands followed by showgraph. newgraph sets up the graphics device, and it's called when the Rpad package starts. showgraph generates the HTML to show the graph and runs newgraph to advance to the next graphics file. The user only runs newgraph to change parameters from their defaults. Graphics files are by default named Rpad\_plot1, Rpad\_plot2, and so on. Named graphs can also be used, but there's more of a chance that if the user has caching set wrong (or the server's caching is set wrong) that graphs won't update properly in the user's browser. With the default sequential numbering of files, caching problems are less likely. graphoptions is also available to change the defaults for subsequent graphs.
graphoptions,newgraph和showgraph的功能,可快速设置和显示Web友好的图形。用户通常只可以使用任何的图命令,然后由showgraph。 newgraph设置的图形设备,并RPAD包开始的时候被调用。 showgraph生成的HTML显示图形和,运行newgraph推进到下一个图形文件。用户只需要运行newgraph改变其默认值的参数。图形文件是默认的命名RPAD \ _plot1,RPAD \ _plot2,依此类推。命名图表也可以使用,但有更多的机会,如果用户有缓存设置错误(或服务器的缓存设置是错误的),图形将在用户的浏览器无法正确更新。在默认顺序编号的文件,缓存的问题是不太可能的。 graphoptions也可以为后续的图形更改默认值。

Internally, newgraph uses the postscript device and ghostscript to generate the bitmap for the browser. The pngalpha (type="pngalpha") device of ghostscript does anti-aliasing for smoother-looking PNG output. Also, this approach has the side-effect of creating an EPS file for each graph, so it's easy to add a link to allow the user to download the EPS file. A second approach is to use R's png device directly by specifying type="Rpng" (but on linux, this requires an X server, and results are not antialiased). A third approach allows arbitrary R graphic's devices to be specified. Simon Urbanek's GDD or Cairo packages can be used to generate png (for both packages, see http://www.rosuda.org/R/). This allows high-quality png generation with anti-aliasing, and you don't need ghostscript or X11.
在内部,newgraph使用PostScript设备和Ghostscript的浏览器,生成的位图。该pngalpha(type="pngalpha")设备的Ghostscript抗锯齿平滑寻找PNG输出。另外,这种方法的副作用为每个图形创建EPS文件,因此可以很容易地添加一个链接,允许用户下载的EPS文件。第二种方法是使用R的png设备直接通过指定type="Rpng"(但在Linux上,这需要一个X服务器,结果不抗锯齿)。第三种方法允许指定任意的r图形设备。西蒙乌尔巴内克的GDD或开罗包可以使用,生成PNG(这两个软件包,请参阅http://www.rosuda.org/R/)。这使得高品质的PNG抗混叠代,而你并不需要Ghostscript或X11。


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

RpadPlotName() returns the name of the currently active plot. None of the other routines return a value: all are run for their side effects.
RpadPlotName()返回当前活动的图的名称。没有其他例程返回一个值:都运行其副作用的。


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


Tom Short, EPRI, (<a href="mailto:tshort@epri.com">tshort@epri.com</a>)



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

See also bitmap, png, and pdf.
请参阅bitmap,png,pdf。


实例----------Examples----------


# make some graphs (a default graphics device is already available)[一些图表(默认的图形设备已经提供)]
  x <- 1:10
  y <- x^2
  y2 <- x^3
  if (capabilities("png")) graphoptions(type="Rpng")
  newgraph()
  plot(x, y)  # does the plot[不积]
  plot(x, y2) # does the second plot[做的第二个图]
  HTMLon()    # sets Rpad to HTML output[HTML输出的套RPAD]
  showgraph() # closes the device, outputs the HTML for the both[关闭设备,输出两者的HTML]
              # images, and creates the next device[图像,并创建的下一个设备]
  plot(x, y2)
  showgraph()

# graphs with named files:[图表命名的文件:]
  newgraph("graph_A")
  plot(x, y)
  showgraph("graph_A")
  newgraph("graph_B", width = 4, height = 6) # also adjust the width and height[还可以调整宽度和高度]
  plot(x, y2)
  showgraph("graph_B")

# an example with Simon Urbanek's GDD device:[乌尔巴内克的西蒙GDD设备的一个例子:]
  if (require(GDD)) {
    graphoptions(type = GDD, width = 4, height = 3) # note the use of inches[注意使用英寸]
    newgraph()
    plot(x, y)
    plot(x, y2)
    showgraph()
  }

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 00:53 , Processed in 0.024925 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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