grid.roundrect(grid)
grid.roundrect()所属R语言包:grid
Draw a rectangle with rounded corners
绘制一个圆角的矩形
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Draw a single rectangle with rounded corners.
绘制一个单圆角矩形。
用法----------Usage----------
roundrectGrob(x=0.5, y=0.5, width=1, height=1,
default.units="npc",
r=unit(0.1, "snpc"),
just="centre",
name=NULL, gp=NULL, vp=NULL)
grid.roundrect(...)
参数----------Arguments----------
参数:x, y, width, height
The location and size of the rectangle.
矩形的位置和大小。
参数:default.units
A string indicating the default units to use if x, y, width, or height are only given as numeric vectors.
只给一个字符串,表示如果x,y,width或height使用的默认单位为数字向量。
参数:r
The radius of the rounded corners.
圆角的半径。
参数:just
The justification of the rectangle relative to its location.
相对于其位置的矩形的理由。
参数:name
A name to identify the grob.
一个名称来标识的GROB。
参数:gp
Graphical parameters to apply to the grob.
图形参数的GROB申请。
参数:vp
A viewport object or NULL.
一个视口对象或NULL。
参数:...
Arguments to be passed to roundrectGrob().
参数被传递到roundrectGrob()。
Details
详情----------Details----------
At present, this function can only be used to draw one rounded rectangle.
目前,此功能只能用于绘制一个圆角矩形。
举例----------Examples----------
grid.roundrect(width=.5, height=.5, name="rr")
theta <- seq(0, 360, length=50)
for (i in 1:50)
grid.circle(x=grobX("rr", theta[i]),
y=grobY("rr", theta[i]),
r=unit(1, "mm"),
gp=gpar(fill="black"))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|