Rev 68948 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/grid/man/grid.circle.Rd% Part of the R package, https://www.R-project.org% Copyright 1995-2015 R Core Team% Distributed under GPL 2 or later\name{grid.circle}\alias{grid.circle}\alias{circleGrob}\title{ Draw a Circle }\description{Functions to create and draw a circle.}\usage{grid.circle(x=0.5, y=0.5, r=0.5, default.units="npc", name=NULL,gp=gpar(), draw=TRUE, vp=NULL)circleGrob(x=0.5, y=0.5, r=0.5, default.units="npc", name=NULL,gp=gpar(), vp=NULL)}\arguments{\item{x}{A numeric vector or unit object specifying x-locations.}\item{y}{A numeric vector or unit object specifying y-locations.}\item{r}{A numeric vector or unit object specifying radii.}\item{default.units}{A string indicating the default units to useif \code{x}, \code{y}, \code{width}, or \code{height}are only given as numeric vectors.}\item{name}{ A character identifier. }\item{gp}{An object of class \code{gpar}, typically the outputfrom a call to the function \code{gpar}. This is basicallya list of graphical parameter settings.}\item{draw}{A logical value indicating whether graphics outputshould be produced.}\item{vp}{A Grid viewport object (or NULL).}}\details{Both functions create a circle grob (a graphical object describing acircle), but only \code{grid.circle()}draws the circle (and then only if \code{draw} is \code{TRUE}).The radius may be given in anyunits; if the units are \emph{relative} (e.g., \code{"npc"} or\code{"native"}) then the radius will be different depending onwhether it is interpreted as a width or as a height. In such cases,the smaller of these two values will be the result. To see theeffect, type \code{grid.circle()} and adjust the size of the window.What happens for very small radii is device-dependent: thecircle may become invisible or be shown at a fixed minimum size.Circles of zero radius will not be plotted.}\section{Warning}{Negative values for the radius are silently converted to theirabsolute value.}\value{A circle grob. \code{grid.circle()} returns the value invisibly.}\author{Paul Murrell}\seealso{\link{Grid},\code{\link{viewport}}}\keyword{dplot}