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

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

[复制链接]
发表于 2012-10-1 16:35:12 | 显示全部楼层 |阅读模式
cloud3d(vrmlgen)
cloud3d()所属R语言包:vrmlgen

                                         Draw a 3D scatter plot
                                         绘制一个三维散点图

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

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

cloud3d creates dynamic 3D scatter plot visualizations in the VRML- or Livegraphics3D-format.
cloud3d创建动态三维的散点图可视化在的VRML或Livegraphics3D的格式。


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


cloud3d(x, y = NULL, z = NULL, labels = rownames(data),
        filename = "out.wrl", type = "vrml",
        pointstyle = c("s", "b", "c"), metalabels = NULL,
        hyperlinks = NULL, cols = rainbow(length(unique(labels))),
        scalefac = 4, autoscale = "independent",
        lab.axis = c("X-axis", "Y-axis", "Z-axis"),
        col.axis = "black", showaxis = TRUE, col.lab = "black",
        col.bg = "white", cex.lab = 1, htmlout = NULL,
        hwidth = 1200, hheight = 800, showlegend = TRUE,
        vrml_navigation = "EXAMINE", vrml_showdensity = FALSE,
        vrml_fov = 0.785, vrml_pos = rep(scalefac + 4, 3),
        vrml_dir = c(0.19, 0.45, 0.87, 2.45),
        vrml_transparency = 0, lg3d_ambientlight = 0.5)



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

参数:x
a 3-column numeric matrix of coordinates or a numeric vector of x-coordinates (not used if parameter obj\_infile or xfun is specified)
具有3列的数字矩阵的坐标或数字的向量的x坐标(如果不使用参数obj \ _infile或xfun指定)


参数:y
a numeric vector of y-coordinates (only needed if x is a vector)
一个数值向量的y坐标(只需要如果x是一个向量)


参数:z
a numeric vector of z-coordinates (only needed if x is a vector)
一个数值向量的z坐标(如果只需要x是一个向量)


参数:labels
a vector of size n containing optional class labels (strings or numbers) for the data points
一个向量的大小为n的数据点包含可选的类标签(字符串或数字)


参数:filename
filename of the generated output file  
所生成的输出文件的文件名


参数:type
the output type ("vrml" or "lg3d"), this will be set automatically if mesh3d is called after vrml.open() or lg3d.open()
输出类型(“VRML”或“LG3D”),这将被设置,自动mesh3d被称为,后vrml.open()或lg3d.open()


参数:pointstyle
a vector of point style types. Possible types are "s" for spheres, "b" for boxes and "c" for cone. To draw all points in the same style, use a vector of size 1, otherwise the number of used point styles must be greater or equal to the number of different labels (i.e. length(pointstyles) >= length(unique(labels)))
一个向量的点样式类型。可能的类型是“S”的领域,盒子和“B”“C”为圆锥体。要绘制所有的点在相同的风格,使用矢量的大小为1,否则使用的点样式的数量必须大于或等于不同的标签的数量(即的长度(pointstyles)=长(唯一的(标签)) )


参数:metalabels
a vector of strings or numbers containing optional metalabels for the rows which can be accessed by hovering the mouse over a data point in the plot (in VRML)
一个向量的字符串或数字包含可选的metalabels的,可以将鼠标悬停在一个数据点在图中(VRML访问的行)


参数:hyperlinks
a vector of strings specifying hyperlinks that will be triggered, when the user clicks on the corresponding datapoint
一个向量的字符串指定将触发的超链接,当用户点击相应的数据点


参数:cols
a vector of colors to visualize different classes among the data points. The number of colors should either be one or at least as large as the number of different labels (i.e. length(col) >= length(unique(labels))
矢量的颜色的可视化的数据点之间的不同的类。的颜色数应该是一个或至少一样大的不同的标签的数量(即长度(山口)> =长度(独特的(标签))


参数:scalefac
a numerical scaling factor to increase/decrease the size of the plotted 3D objects
数值的缩放因子,以增加/减少的大小,绘制3D对象


参数:autoscale
the scaling type. "independent" means all axes are auto-scaled independently. "equidist" means all axes are scaled by the same factor and "equicenter" additionally positions the drawn object in the center. "none" means no scaling is applied
缩放类型。 “独立”是指所有轴自动缩放的独立。 “equidist”意味着所有轴都以相同的系数和的“equicenter”附加地定位在中心绘制的对象的缩放。 “无”表示不进行缩放的应用


参数:lab.axis
a vector of size 3 containing the axis labels  
一个向量的大小为3,含有轴标签


参数:col.axis
color of the axis  
色的轴


参数:showaxis
if FALSE, the coordinate axes are hidden in the output     
如果为false,隐藏坐标轴的输出


参数:col.lab
a vector of colors specifying the axis labels  
矢量的颜色指定的轴标签


参数:col.bg
background color   
背景颜色


参数:cex.lab
scaling factor for axis label font size  
轴标签的字体大小的缩放因子


参数:htmlout
a filename for generating an HTML-file to embed the VRML-output  
用于产生一个HTML文件的文件名嵌入的VRML输出


参数:hwidth
width of the embedded visualization in the HTML-output  
在HTML输出宽度的嵌入式的可视化


参数:hheight
height of the embedded visualization in the HTML-output  
嵌入式的可视化在HTML输出高度


参数:showlegend
if TRUE, a data legend will be drawn based on the group labels
如果为true,数据组标签的基础上,将绘制传说


参数:vrml_navigation
type of mouse navigation in the VRML file, can be "EXAMINE", "WALK", "SLIDE", "FLY" or "PAN" (VRML only)
在VRML文件类型的鼠标导航,可以“检查”,“WALK”,“滑动”,“FLY”或“PAN”(VRML只)


参数:vrml_showdensity
if TRUE, semi-transparent density estimation contour surfaces will be drawn to identify regions of high data density (requires misc3d-package)
如果为TRUE,半透明密度估计的轮廓表面会被吸引到确定区域的高数据密度(需要misc3d包)


参数:vrml_transparency
a number between 0 and 1 specifying the transparency level of plotted objects (VRML only)
0和1之间的一个数,指定绘制对象的透明度级别(VRML只)


参数:vrml_fov
a scalar defining the field of view angle in the VRML file in radians (VRML only)
在VRML文件以弧度为单位定义的视野角(VRML只)的一个标量


参数:vrml_pos
a vector of size 3 corresponding to the position of the viewpoint (VRML only)
的大小为3的矢量对应的视点位置(VRML的只)


参数:vrml_dir
a vector of size 4 specifying the viewing direction (first 3 components) and the rotation of the camera around the direction vector (last component in radians, VRML only)
大小为4的矢量指定的观看方向(第3成分)和周围的摄像头的旋转的方向矢量(以弧度为单位的最后一个组件,VRML只)


参数:lg3d_ambientlight
ambient light gray level (value between 0 and 1, LG3D only)   
环境光的灰度级(0和1之间的值,只LG3D)


Details

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

cloud3d creates dynamic 3D-scatterplots with optional features like density estimation contour surfaces and hyperlinks for each datapoint in the VRML- or Livegraphics3D-format. The plots can automatically be embedded in a HTML-file to allow users to inspect the data interactively and from different 3D-perspectives and scalings on a webpage.
在的VRML或Livegraphics3D的格式为每个数据点的密度估计轮廓表面和超链接的可选功能,如cloud3d创建动态三维散点图。上图可以自动被嵌入在一个HTML文件中,允许用户检查数据交互,从不同的3D视角和网页上的结垢。

To add additional shapes and objects to the final 3D scene, this plotting  function can also be called within a VRML- or Livegraphics3D-environment  created by calling the vrml.open() or lg3d.open() function. In this case,  cloud3d will inherit all global parameters set in the vrml.open- or lg3d.open- function (e.g. filename, type, htmlout, etc.) and the user does not need to  specify these options anymore.
要添加额外的形状和物体最终的3D场景,绘图功能也可以被称为内的VRML或Livegraphics3D的环境,通过调用的vrml.open()或lg3d.open()函数创建。在这种情况下,cloud3d将继承的vrml.open或lg3d.open功能(例如,文件名,类型,htmlout等)和用户设定的所有全局参数不需要再指定这些选项。


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

The function is used for its side-effect (creating a VRML- or Livegraphics3D-file) and has no return value.
该功能用于其副作用(创建VRML或Livegraphics3D文件的),并没有返回值。


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


Enrico Glaab



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





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

mesh3d, bar3d
mesh3d,bar3d


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




curdir <- getwd()
outdir <- tempdir()
setwd(outdir)


# example 1: visualize random 3D input data[例1:随机的3D输入数据可视化]
mat <- matrix(runif(99, 0, 3), ncol = 3)

# create random class assignment vector with three classes[创建随机类三个类别的分配向量,]
y <- round(runif(33, 0, 2))
y <- ifelse(y == 0, "class 1", ifelse(y == 1, "class 2", "class 3"))

# create ouput using numbers from 1 to length(y) as metalabels[创建输出中使用数字从1到长度(Y)metalabels]
cloud3d(mat, labels = y, metalabels = 1:length(y), col.axis = "black",
        col.lab = "blue", col.bg = "white", type = "vrml",
        filename = "result.wrl", htmlout = "result.html")

# show the output in a web-browser [在Web浏览器中显示的输出]
# (VRML-plugin must be installed!)[(VRML插件必须安装!)]
if(file.exists(paste("file://",file.path(outdir,
                "result.html"), sep = "")))
{
  browseURL(paste("file://",file.path(outdir,
                  "result.html"), sep = ""))
}


# example 2: visualization of Edgar Anderson's Iris data[例2:埃德加·安德森的Iris数据的可视化]
# using density estimation contour surfaces (requires misc3-package!)[使用密度估计轮廓表面的(需要misc3包!)]
irismat <- iris[,1:3]
cloud3d(irismat, labels = iris[,5], vrml_showdensity = TRUE,
        col.axis = "blue", col.lab = "black", lab.axis = colnames(irismat),
        type = "vrml", filename = "result2.wrl", htmlout = "iris.html")

# show the output in a web-browser [在Web浏览器中显示的输出]
# (VRML-plugin must be installed!)[(VRML插件必须安装!)]
if(file.exists(paste("file://",file.path(outdir,
                "iris.html"), sep = "")))
{
  browseURL(paste("file://",file.path(outdir,
                  "iris.html"), sep = ""))
}

setwd(curdir)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 01:29 , Processed in 0.026632 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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