gplot.loop(sna)
gplot.loop()所属R语言包:sna
Add Loops to a Plot
添加循环的图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
gplot.loop draws a "loop" at a specified location; this is used to designate self-ties in gplot.
gplot.loop绘制一个“循环”,在指定的位置,这是用来指定在gplot的自我关系。
用法----------Usage----------
gplot.loop(x0, y0, length = 0.1, angle = 10, width = 0.01, col = 1,
border = 1, lty = 1, offset = 0, edge.steps = 10, radius = 1,
arrowhead = TRUE, xctr=0, yctr=0, ...)
参数----------Arguments----------
参数:x0
a vector of x coordinates for points of origin.
一个向量的X坐标为始发站。
参数:y0
a vector of y coordinates for points of origin.
一个向量y坐标的原点的点。
参数:length
arrowhead length, in current plotting units.
箭头长度,在当前的绘图单位。
参数:angle
arrowhead angle (in degrees).
箭头角(单位:度)。
参数:width
width for loop body, in current plotting units (can be a vector).
循环体的宽度,在当前的绘图单元(可以是一个向量)。
参数:col
loop body color (can be a vector).
循环体的颜色(可以是一个向量)。
参数:border
loop border color (can be a vector).
循环边框颜色(可以是一个向量)。
参数:lty
loop border line type (can be a vector).
循环边界线类型(可以是一个向量)。
参数:offset
offset for origin point (can be a vector).
原点偏移量(可以是一个向量)。
参数:edge.steps
number of steps to use in approximating curves.
数逼近曲线的步骤来使用。
参数:radius
loop radius (can be a vector).
环半径(可以是一个向量)。
参数:arrowhead
boolean; should arrowheads be used? (Can be a vector.)
布尔值,箭头使用? (可以是一个向量。)
参数:xctr
x coordinate for the central location away from which loops should be oriented.
x坐标的中心位置,距离回路应为导向。
参数:yctr
y coordinate for the central location away from which loops should be oriented.
y坐标的中心位置,距离循环的方向应该是。
参数:...
additional arguments to polygon.
附加参数到polygon。
Details
详细信息----------Details----------
gplot.loop is the companion to gplot.arrow; like the latter, plot elements produced by gplot.loop are drawn using polygon, and as such are scaled based on the current plotting device. By default, loops are drawn so as to encompass a circular region of radius radius, whose center is offset units from x0,y0 and at maximum distance from xctr,yctr. This is useful for functions like gplot, which need to draw loops incident to vertices of varying radii.
gplot.loop是gplot.arrow;喜欢后者,图元素所产生的同伴gplot.loop使用polygon,因此基于对当前的打印设备进行缩放绘制。缺省情况下,循环,以便包括一个圆形区域的半径的radius,其中心是offset从x0,y0和在最大距离xctr,yctr单位绘制。这是有用的功能,如gplot,需要借助不同半径的顶点循环事件。
值----------Value----------
None.
无。
(作者)----------Author(s)----------
Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>
参见----------See Also----------
gplot.arrow, gplot, polygon
gplot.arrow,gplot,polygon
实例----------Examples----------
#Plot a few polygons with loops[绘制一个多边形的循环]
plot(0,0,type="n",xlim=c(-2,2),ylim=c(-2,2),asp=1)
gplot.loop(c(0,0),c(1,-1),col=c(3,2),width=0.05,length=0.4,
offset=sqrt(2)/4,angle=20,radius=0.5,edge.steps=50,arrowhead=TRUE)
polygon(c(0.25,-0.25,-0.25,0.25,NA,0.25,-0.25,-0.25,0.25),
c(1.25,1.25,0.75,0.75,NA,-1.25,-1.25,-0.75,-0.75),col=c(2,3))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|