axis3d(vrmlgen)
axis3d()所属R语言包:vrmlgen
Draw labeled coordinate axes in a 3D-scene
绘制标记在3D场景的坐标轴
译者:生物统计家园网 机器人LoveR
描述----------Description----------
axis3d draws 3 labeled, orthogonal coordinate axes in a 3D-scene in the VRML- or Livegraphics3D-format. Must be called after vrml.open() or lg3d.open() and before vrml.close() or lg3d.close().
axis3d平3标记,直角坐标轴在三维场景中的VRML或Livegraphics3D的格式。必须调用后vrml.open()或lg3d.open()和的vrml.close()或lg3d.close(前)。
用法----------Usage----------
axis3d(lab.axis = c("X-axis", "Y-axis", "Z-axis"),
filename = NULL, type = "vrml", col.lab = "black",
col.axis = "black", cex.lab = 1, local_scale = 1,
global_scale = 1)
参数----------Arguments----------
参数:lab.axis
a vector of size 3 containing the axis labels
一个向量的大小为3,含有轴标签
参数: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()
参数:col.lab
a vector of colors specifying the axis labels
矢量的颜色指定的轴标签
参数:col.axis
color of the axis
色的轴
参数:cex.lab
scaling factor for axis label font size
轴标签的字体大小的缩放因子
参数:local_scale
a numerical scaling factor to increase/decrease the size of the plotted axes
数值的缩放因子,以增加/减少的大小,绘制轴
参数:global_scale
a numerical scaling factor applied to all objects in the 3D scene
在3D场景中的所有对象的数字比例因子
Details
详细信息----------Details----------
axis3d adds colored and labeled coordinate axes to an already existing 3D- scene in the VRML- or Livegraphics3D-format. To create a standard scatter plot, bar plot or 3D mesh visualization, which already contains coordinate axes, the higher-level plotting functions cloud3d, bar3d and mesh3d provide more convenient alternatives. axis3d can only be applied within a VRML- or Livegraphics3D-environment created by calling the vrml.open() or lg3d.open() function and closed using the vrml.close() or lg3d.close() function.
axis3d补充颜色和标记坐标轴到一个现有的3D场景中的VRML或Livegraphics3D的格式。要创建一个标准的散点图,条形图或三维网格的可视化,里面已经包含了坐标轴,更高级别的绘图功能cloud3d中,bar3d和mesh3d提供更方便的替代品。 axis3d只能适用于内的VRML或Livegraphics3D的环境调用vrml.open()或lg3d.open()函数和封闭使用的vrml.close()或lg3d.close()函数创建的。
值----------Value----------
The function is used for its side-effect (writing coordinate axes to 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----------
text3d, lines3d
text3d,lines3d
实例----------Examples----------
curdir <- getwd()
outdir <- tempdir()
setwd(outdir)
# start a new VRML environment[开始一个新的VRML环境]
vrml.open(file = "axis_example.wrl", scale = 5,
html.embed = "axis.html")
# draw a coordinate system with dark blue axes[与深蓝色的轴画一个坐标系]
# and dark gray axis labels[和深灰色轴标签]
axis3d(col.lab = "darkgray", col.axis = "darkblue")
# plot random data points within the coordinate system[图的随机数据点的坐标系内]
# (increase point size by a factor of 2)[(增加点大小的2倍)]
mat <- matrix(runif(99, 0, 1), ncol = 3)
points3d(mat, col = "red", scale = 2)
# close the VRML environment and write the output file[关闭VRML环境,将输出写入文件]
vrml.close()
# show the output in a web-browser [在Web浏览器中显示的输出]
# (VRML-plugin must be installed!)[(VRML插件必须安装!)]
if(file.exists(paste("file://",file.path(outdir,
"axis.html"), sep = "")))
{
browseURL(paste("file://",file.path(outdir,
"axis.html"), sep = ""))
}
setwd(curdir)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|