roundrect package:grid R Documentation _D_r_a_w _a _r_e_c_t_a_n_g_l_e _w_i_t_h _r_o_u_n_d_e_d _c_o_r_n_e_r_s _D_e_s_c_r_i_p_t_i_o_n: Draw a _single_ rectangle with rounded corners. _U_s_a_g_e: 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(...) _A_r_g_u_m_e_n_t_s: 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. r: The radius of the rounded corners. just: The justification of the rectangle relative to its location. name: A name to identify the grob. gp: Graphical parameters to apply to the grob. vp: A viewport object or 'NULL'. ...: Arguments to be passed to 'roundrectGrob()'. _D_e_t_a_i_l_s: At present, this function can only be used to draw _one_ rounded rectangle. _E_x_a_m_p_l_e_s: 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"))