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

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

[复制链接]
发表于 2012-9-30 00:50:29 | 显示全部楼层 |阅读模式
imagesend(sendplot)
imagesend()所属R语言包:sendplot

                                        INTERACTIVE IMAGE
                                         交互式图像

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

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

This function is a wrapper to sendplot that will create a single interactive image
这个函数是一个的包装到sendplot,将创建一个交互式图像


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



imagesend(plot.call,
           x.pos,
           y.pos,
           xy.type,
           plot.extras = NA,
           mai.mat=NA, mai.prc=FALSE,
           xy.labels=NA,
           image.size="800x1100",
           spot.radius = 5,
           fname.root="Splot",
           dir="./",
           window.size = "800x1100",
           ...)  




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

参数:plot.call
character vector containing single plot call
字符向量单一图呼叫


参数:x.pos
vector of x locations for interactive points
向量的x位置为互动点


参数:y.pos
vector of y locations for interactive points
y位置为向量的互动点


参数:xy.type
Indication of how the xpos and ypos values should be treated.Current options are "image.midpoint","image.boundaries", or "image.box".See details or vignette.
xpos和ypos值应如何是treated.Current选项指示是“image.midpoint”,的“image.boundaries”,或“image.box”查看详情或小插图。


参数:plot.extras
List of additional plotting calls that should be executed for the plot.
的图,应执行额外的绘图调用的列表。


参数:mai.mat
1 x 4 matrix of values to be passed in for each plots par mai. n is equal to the length of plot.calls. If NA, uses default margins.
1 x 4矩阵的值来传递为每个图面值迈。 n是等于plot.calls的长度。如果不适用,使用默认的页边距。


参数:mai.prc
logical indicating if mai mat values are percentages or hard coded values. If mai.proc is T, indicates percentage.
逻辑说明,如果迈垫值的百分比或硬编码值。如果mai.proc是T,表示百分比。


参数:xy.labels
list of matricies. All matricies should be of n x m where n is the length of y and m is the length of x when xy.type is "image.midpoint". All matricies should be of n x m where n is the length of y -1 and m is the length of x - 1 when xy.type is "image.boundaries" or "image.box".  This information is displayed in the interactive plot window
列表的matricies。其中n是y的长度,m是x的长度当xy.type是“image.midpoint”时,所有matricies应该是NXM。其中n是长度的y -1和m是长度x  -  1当xy.type中是“image.boundaries”或“image.box”时,是所有matricies应NXM。此信息将显示在交互式绘图窗口


参数:image.size
character indicating size of device.
字符指示的移动设备的大小。


参数:spot.radius
radius of circle in pixels indicating area that will be interactive around the center of graphed points
圆的半径,在指示区域的像素,将绘制的点的中心周围是交互式


参数:fname.root
Base name to use for all files created.
基本名称使用的所有文件创建。


参数:dir
directory path to where files should be created. Default creates files in working directory
应建立文件的目录路径。默认创建的文件在工作目录


参数:window.size
size of the html window
的HTML窗口的大小


参数:...
additional arguments to the makeImap function
其他参数的makeImap功能的


Details

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

This function is a wrapper for the sendplot function to create a single interacive image. See initSplot, makeImap, and makeSplot for more information.
此功能是的包装创建一个单一的interacive形象的sendplot功能。见initSplot,makeImap和makeSplot的详细信息。

Users are encouraged to read the package vignette which includes a detailed discussion of all function arguments as well as several useful examples.
我们鼓励用户阅读的的包小插曲,其中包括详细讨论了函数的所有参数以及一些有用的例子。


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

Creates a static and interactive image
创建一个静态和交互式图像


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

The interactive html plot currently only works in web browsers that implement java script.
交互的HTML图目前只适用于在实现Java脚本的Web浏览器。

The code used to create the javascript embedded in html file is a modified version of the javascript code or from the open source tooltip library. see reference links
用于创建JavaScript嵌入在HTML文件中的代码是修改后的版本的JavaScript代码的开源工具提示库。见参考文献链接


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


Lori A. Shepherd, Daniel P. Gaile



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




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

initSplot, makeImap,
initSplot,makeImap,


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


library(sendplot)
library(rtiff)
library(stats)

mai.mat = matrix(c(1,1,1,1), ncol=4)

carsX  = as.matrix(mtcars)
carsX <- sweep(carsX, 2, colMeans(carsX, na.rm = TRUE))
        sx <- apply(X=carsX, MARGIN=2, FUN="sd", na.rm = TRUE)
        carsX <- sweep(carsX, 2, sx, "/")

plot.call="image(x=1:dim(carsX)[2],y=1:dim(carsX)[1], z=t(carsX),axes =
FALSE, xlab = '', ylab = '');axis(1,1:dim(carsX)[2],
labels=colnames(carsX),las = 2, line = -0.5, tick = 0,cex.axis =.8);
axis(4,1:dim(carsX)[1], labels=rownames(carsX),las = 2, line = -0.5,
tick = 0,cex.axis =.65)"

xy.labels=list(value=round(carsX,3))

x.labels=data.frame(label=colnames(carsX),
  description=c("Miles/(US) gallon","Number of cylinders",
    "Displacement (cu.in.)",
    "Gross horsepower",
    "Rear axle ratio",
    "Weight (lb/1000)",
    "1/4 mile time",
    "V/S",
    "Transmission (0 = automatic, 1 = manual)",
    "Number of forward gears",
    "Number of carburetors")
  )


#set up temporary directory[设立临时目录]
direct = paste(tempdir(),"/",sep="")
direct

imagesend(plot.call=plot.call,
           x.pos= 1:dim(carsX)[2],
           y.pos= 1:dim(carsX)[1],
           xy.type = "image.midpoints",
           xy.labels=xy.labels,
           spot.radius = 5,
           fname.root="manImage", dir=direct,
           window.size = "800x1100",
           x.labels=x.labels, mai.mat=mai.mat)  



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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-19 07:28 , Processed in 0.023151 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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