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

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

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

                                        ADDS DEFAULT TOOL-TIP REGION
                                         添加默认的工具提示区

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

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

The default region in an html image map is any part of the figure not already specified with a different region (i.e. rect, circle, poly). This function adds tool-tip information to the default region.
在一个HTML图像图的默认区域是图中的任何部分尚未指定不同的区域(即矩形,圆形,聚)。该函数将工具提示信息到预设的区域。


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



addDefault(Splot,
          data=NA,
          data.labels=NA,
          links=NA,
          links.labels=NA,
          asLink=NA,
          font.type="Helvetica",   
          font.color="black",  
          font.size="12",     
          bg.color='#D6E3F6',
          returnVl=TRUE,
          saveFlag=FALSE,
          saveName="Splot.RData")




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

参数:Splot
An Object of the class Splot
一个对象的类Splot


参数:data
character vector containing data to be displayed in tool-tip
字符向量数据显示在工具提示


参数:data.labels
names descripting data vector
descripting数据向量的名称


参数:links
character vector containing complete web address for hyperlinks within tool-tip
包含完整的网络工具提示超链接地址的字符向量


参数:links.labels
names describing links vector
名称描述链接矢量的


参数:asLink
complete web address for area to be treated as hyperlink
完整的Web地址区被视为超链接


参数:font.type
font type for tool-tip. Currently support fonts are Arial, Helvetica,and sans-serif
工具提示的字体类型。目前支持的字体是宋体,黑体,sans-serif字体


参数:font.color
font color for tool-tip
字体颜色刀尖


参数:font.size
font size in tool-tip
在工具提示的字体大小


参数:bg.color
background color of tool-tip
刀尖的背景颜色


参数:returnVl
logical indicating if Splot object should be returned
逻辑,表明如果Splot对象应该返回


参数:saveFlag
logical indicating if Splot object should be saved to a file
逻辑表明如果Splot对象应该被保存到一个文件


参数:saveName
if saveFlag, path and file name to save object
如果saveFlag,路径和文件名保存对象


Details

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

This function takes in data and links vectors, and converts into proper syntax for tool-tip. It also sets up default tool-tip display regarding font color, size, and type, as well as background color.
这个函数需要的数据和链接向量,并将其转换成工具提示的正确语法。还设置了默认的工具提示显示的字体颜色,大小,类型,以及背景颜色。


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

The Splot object is updated to include a Default.Obj containing vectors in proper syntax and tool-tip display information.
Splot对象更新包含正确的语法和工具提示显示信息的向量在包括Default.Obj的。


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

There can only be one default for a given layout of figures. If this is run more than once it will override previous calls.
只能有一个默认情况下,对于一个给定的数字布局。如果这是执行超过一次,它会覆盖以前的呼叫。


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


Lori A.Shepherd, Daniel P. Gaile



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




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

initSplot
initSplot


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



library(sendplot)
library(rtiff)

# sets up matrix for layout[设置矩阵布局]
mat = matrix(1,nrow=12, ncol=13)
mat[9:12,] = 2
mat[,9:13] = 3
mat[1:2,] = 4

# sets up figure margins[设置数字的利润]
mai.mat = matrix(.5,ncol=4,nrow=4)

# vector of image values[矢量的图像值]
myX = c(-1,-10,1,10,-5,0)

# plot calls[图需要]
plot.calls = c("boxplot(count ~ spray, data = InsectSprays, col = 'lightgray')", "plot(1:3,1:3, col='blue', xlab='', ylab=''); points(1:2, 2:3, col='red')", "image(1:2,1:3, z=matrix(myX,ncol=3,nrow=2), xlab='', ylab='')","plot(cos, xlim = c(-pi,3*pi), n = 1001, col = 'blue', xlab='', ylab='')" )
plt.extras=list(figure1= "rect(xleft=c(3,1), ytop=c(25,5),xright=c(4,2),  ybottom=c(20,0));title(main='A', cex=3)", figure2="polygon(x=c(2,2.5,3,2.5), y=c(1,2.5,1,1.5));title(main='B', cex=3)", figure3 ="title(main='C', cex=3)", figure4="title(main='D', cex=3)")


# initialize Splot object[初始化Splot对象]
Splot = initSplot(mat, plot.calls, mai.mat = mai.mat,plot.extras =plt.extras)

# add default[添加默认]
Splot = addDefault(Splot, data=c("This is default", "data2"), data.labels=c("label", "d2"), links=c("http://www.buffalo.edu, http://www.bioinformatics.buffalo.edu", "http://www.bioinformatics.buffalo.edu"), links.labels=c("hyp1", "hyp2"),font.size=10, font.type="arial", bg.color="gray", font.color="yellow")



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


# make plot that has interactive default [图,有互动的默认]
Splot = makeSplot(Splot, fname.root="exToy",dir=direct, returnObj=TRUE)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-19 04:30 , Processed in 0.024430 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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