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

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

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

                                         Draw a 3D bar chart
                                         绘制一个三维条形图

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

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

bar3d creates 3D barplots and height map visualizationsin the VRML- or  Livegraphics3D-format.
bar3d创建的3D barplots和高度图visualizationsin的VRML或Livegraphics3D的格式。


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


bar3d(data, row.labels = rownames(data),
      col.labels = colnames(data), metalabels = NULL,
      filename = "out.wrl", type = "vrml", space = 0.5,
      cols = rainbow(length(as.matrix(data))),
      rcols = NULL, ccols = NULL, origin = c(0, 0, 0),
      scalefac = 4, lab.axis = c("X-axis", "Y-axis", "Z-axis"),
      lab.vertical = FALSE, col.axis = "black",
      showaxis = TRUE, autoscale = TRUE,
      ignore_zeros = TRUE, col.lab = "black",
      col.bg = "white", cex.lab = 1, cex.rowlab = 1,
      cex.collab = 1, htmlout = NULL, hwidth = 1200,
      hheight = 800, showlegend = TRUE,
      vrml_navigation = "EXAMINE", vrml_transparency = 0,
      vrml_fov = 0.785, vrml_pos = rep(scalefac + 4, 3),
      vrml_dir = c(0.19, 0.45, 0.87, 2.45),
      lg3d_ambientlight = 0.5)



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

参数:data
a numerical matrix with 3 columns and n rows
具有3列和n行的数字矩阵


参数:row.labels
a vector containing the row labels (strings or numbers)
一个向量,包含列标签(字符串或数字)


参数:col.labels
a vector containing the column labels (strings or numbers)
一个向量,包含列标签(字符串或数字)


参数: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访问的行)


参数: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()


参数:space
space between single bars in a bar plot (as a fraction of the average bar width)
在条形图的单条之间的空间(如条形的平均宽度的一小部分)


参数: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))
矢量的颜色的可视化的数据点之间的不同的类。的颜色数应该是一个或至少一样大的不同的标签的数量(即长度(山口)> =长度(独特的(标签))


参数:rcols
specifies the bar colors per row of the input matrix (the cols- and ccols paramter can remain undefined). The number of colors must correspond to the numbers of rows of the data matrix.
指定每行输入矩阵(列和ccols放慢参数可以保持未定义)条的颜色。的颜色数量必须对应于数据矩阵的行的数目。


参数:ccols
specifies the bar colors per column of the input matrix (the cols- and rcols-parameter can remain undefined). The number of colors must correspond to the numbers of columns of the data matrix.
指定的输入矩阵的每列(列和rcols参数可以保持未定义)条的颜色。的颜色数量必须对应于在数据矩阵的列的数目。


参数:origin
a vector of length 3 specifying the coordinates of the plot origin (can be used to translate the plot)
一个向量的长度为3,指定打印原点的坐标(可用于翻译的图)


参数:scalefac
a scaling factor for the size of the entire plot
整个小区的大小的比例因子


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


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


参数:lab.vertical
if TRUE, the data labels will be plotted in vertical instead of horizontal orientation
如果为true,数据标签将被绘制在垂直而不是水平方向


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


参数:autoscale
if TRUE, the data is automatically scaled to fill the volume between the axes
如果为true,数据会自动缩放以填充量轴之间的


参数:ignore_zeros
if TRUE, for height values equal to zero no bar will be plotted     
如果为TRUE,高度重视等于零,没有条形将被绘制


参数:col.lab
a vector of colors for the axis labels  
一个向量轴标签的颜色


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


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


参数:cex.rowlab
scaling factor for matrix row labels font size  
矩阵的行标签的字体大小的缩放因子


参数:cex.collab
scaling factor for matrix column labels font size  
矩阵的列标签的字体大小的缩放因子


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


参数: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 added to the 3D plot
如果为TRUE,则数据将被添加到传说中的3D绘图


参数: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_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----------

bar3d generates 3D barplots and height map visualizationsin 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.
bar3d产生的3D barplots和高度图visualizationsin的VRML或Livegraphics3D的格式。上图可以自动被嵌入在一个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----------

3D Data Visualization on the Web. Journal of Statistical Software, 36(8), p. 1-18. URL: http://www.jstatsoft.org/v36/i08/

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

mesh3d, cloud3d
mesh3d,cloud3d


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



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

# Height map visualization of geographical data[高度可视化图的GEO数据]
# with colors corresponding to different height levels[对应于不同的高度水平与颜色]
colpalette <- terrain.colors(max(volcano)-min(volcano)+1)
cols <- colpalette[as.vector(t(volcano))-min(volcano)+1]
bar3d(volcano, col.bg = "white", cols = cols,
      type = "vrml", space = 0, showaxis = FALSE,
      filename = "volcano.wrl", htmlout = "volcano.html")

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

# bar plot for a data matrix with numerical metalabels[条形图数据矩阵的数值metalabels]
mat <- matrix(9:1, nrow = 3)
rownames(mat) <- paste('row',1:3)
colnames(mat) <- paste('col',1:3)
bar3d(mat, space = 1, metalabels = 1:9, col.bg = "white",
      col.axis = "blue", col.lab = "black", type = "vrml",
      filename = "barplot.wrl", htmlout = "barplot.html")
      
# show the output in a web-browser [在Web浏览器中显示的输出]
# (VRML-plugin must be installed!)[(VRML插件必须安装!)]
if(file.exists(paste("file://",file.path(outdir,
                "barplot.html"), sep = "")))
{
  browseURL(paste("file://",file.path(outdir,
                  "barplot.html"), sep = ""))
}

# Height map visualization of very rough and highly[身高图非常粗糙,高度可视化]
# simplified topographic data for the United Kingdom[英国的简化地形数据]

data(uk_topo)

bar3d(uk_topo, autoscale = FALSE, cols = "blue",
     space = 0, showaxis = FALSE, filename = "uk_topo.wrl",
     htmlout = "uk_topo.html")

setwd(curdir)      


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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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