plotDR(RDRToolbox)
plotDR()所属R语言包:RDRToolbox
Plotting tool for two and three dimensional data
绘图工具的二维和三维数据
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Creates two and three dimensional plots of (labeled) data. It uses the library "rgl" for rotatable 3D scatterplots.
创建二,三(标记)数据的三维图。它使用库为可旋转的3D散点图“RGL”。
用法----------Usage----------
plotDR(data, labels, axesLabels=c("x","y","z"), legend=FALSE, text, col, pch, ...)
参数----------Arguments----------
参数:data
matrix with values to be plotted (rows correspond to samples, columns to features)
要绘制的值矩阵(行对应的样本,列功能)
参数:labels
vector containing labels of the classes within the data (optional)
向量标签内的数据的类(可选)
参数:axesLabels
vector containing labels for the axes of the plot
图轴向量标签
参数:legend
logical value whether to automatically insert a legend into the plot
逻辑值是否自动插入到一个传奇的图
参数:text
vector with (short) labels for each point (optional)
向量与每个点(短)标签(可选)
参数:col
character vector of colours for each class (optional); see colors() to display a list of available colours
矢量字符颜色为每个类(可选);colors()显示可用的颜色列表
参数:pch
character or integer value specifying the symbol when plotting points (see ?par or ?points for more info)
打印时指定符号的字符或整型值点(详情参见?par或?points)
参数:...
other common R plot parameters like for example las, cex or font to further customize the plot (see ?par for possible arguments); some parameters may only work with two dimensional plots
其他常见的R图的参数,如las,cex或font来进一步自定义图(见?par可能的参数)例如一些参数可能只使用二维图
Details
详情----------Details----------
It colours the data points according to given class labels (max. six classes when using default colours). A legend will be printed in the R console by default (for three dimensional plots, a legend is not supported).
它的颜色的数据点,根据给定类的标签(最多六班时使用默认颜色)。传说将被打印在默认情况下,的ř控制台(三维图,传说是不支持)。
作者(S)----------Author(s)----------
Christoph Bartenhagen
举例----------Examples----------
## plot a two dimensional LLE embedding of a 1.000 dimensional dataset[#绘制二维的LLE嵌入了1.000的三维数据集]
d = generateData(samples=20, genes=1000, diffgenes=100, blocksize=10)
d_low = LLE(data=d[[1]], dim=2, k=5)
plotDR(data=d_low, labels=d[[2]])
## plot a three dimensional LLE embedding of a 1.000 dimensional dataset[#绘制立体的LLE嵌入了1.000的三维数据集]
d = generateData(samples=20, genes=1000, diffgenes=100, blocksize=10)
d_low = LLE(data=d[[1]], dim=3, k=5)
plotDR(data=d_low, labels=d[[2]])
## plot a two dimensional LLE embedding of a 1.000 dimensional dataset[#绘制二维的LLE嵌入了1.000的三维数据集]
## add axis labels, a legend and plot a text for each sample[#添加轴标签,一个传奇,每个样品绘制文本]
d = generateData(samples=20, genes=1000, diffgenes=100, blocksize=10)
d_low = LLE(data=d[[1]], dim=2, k=5)
text = letters[1:20]
plotDR(data=d_low, labels=d[[2]], axesLabels=c("first component", "second component"), text=text, legend=TRUE)
## manually add a legend to the plot[#手动添加一个传奇的图]
plotDR(data=d_low, labels=d[[2]], axesLabels=c("first component", "second component"), text=text)
legend("topright", legend=c("class 1","class 2"), col=c("black", "red"), pch=1)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|