labelPoints(WGCNA)
labelPoints()所属R语言包:WGCNA
Label scatterplot points
标签散点图点
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Given scatterplot point coordinates, the function tries to place labels near the points such that the labels do not become scrambled.
散点图点的坐标,尝试将这样的标签不会成为炒点附近的标签。
用法----------Usage----------
labelPoints(x, y, labels, cex = 0.7, offs = 0.01, xpd = TRUE, jiggle = 0, ...)
参数----------Arguments----------
参数:x
a vector of x coordinates of the points
的x的向量的坐标点
参数:y
a vector of y coordinates of the points
y的一个矢量的坐标点
参数:labels
labels to be placed next to the points
被放置的点旁边的标签
参数:cex
character expansion factor for the labels
字符膨胀系数的标签
参数:offs
offset of the labels from the plotted coordinates in inches
从绘制以英寸为单位的坐标偏移的标签
参数:xpd
logical: controls truncating labels to fit within the plotting region. See par.
逻辑:控制截断的标签,以适应在绘图区域。见par。
参数:jiggle
amount of random noise to be added to the coordinates. This may be useful if the scatterplot is too regular (such as all points on one straight line).
随机噪声的量被添加到的坐标。这可能是有用的,如果散点图是太有规律的(如在一条直线上的所有点)。
参数:...
other arguments to function text.
其它参数的函数text。
Details
详细信息----------Details----------
The algorithm basically works by finding the direction of most surrounding points, and attempting to place the label in the opposite direction. There are (not uncommon) situations in which this placement is suboptimal; the author promises to further develop the function sometime in the future.
该算法基本上工作通过寻找大多数周围的点的方向,并且在相反的方向,试图以放置标签。 (并不罕见)情况下,这个位置是最理想的;,笔者必将进一步发展的功能在未来的某个时候。
Note that this function does not plot the actual scatterplot; only the labels are plotted. Plotting the scatterplot is the responsibility of the user.
注意,这个函数不绘制的实际散点图仅绘制的标签。绘制散点图是用户的责任。
The argument offset needs to be carefully tuned to the size of the plotted symbols. Sorry, no automation here yet.
偏移量的参数需要仔细地调谐到所绘制的符号的大小。对不起,这里没有自动化。
值----------Value----------
None.
无。
(作者)----------Author(s)----------
Peter Langfelder
参见----------See Also----------
plot.default, text
plot.default,text
实例----------Examples----------
# generate some random points[产生一些随机点]
set.seed(11);
n = 20;
x = runif(n);
y = runif(n);
# Create a basic scatterplot[创建一个基本的散点图]
col = standardColors(n);
plot(x,y, pch = 21, col =1, bg = col, cex = 2.6, xlim = c(-0.1, 1.1), ylim = c(-0.1, 1.0));
labelPoints(x, y, paste("Pt", c(1:n), sep=""), offs = 0.10, cex = 1);
# label points using longer text labels. Note the positioning is not perfect, but close enough.[使用较长的文本标签的标注点。需要注意的定位是不完美的,但足够接近。]
plot(x,y, pch = 21, col =1, bg = col, cex = 2.6, xlim = c(-0.1, 1.1), ylim = c(-0.1, 1.0));
labelPoints(x, y, col, offs = 0.10, cex = 0.8);
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|