| Line 6... |
Line 6... |
| 6 |
\name{grid.circle}
|
6 |
\name{grid.circle}
|
| 7 |
\alias{grid.circle}
|
7 |
\alias{grid.circle}
|
| 8 |
\alias{circleGrob}
|
8 |
\alias{circleGrob}
|
| 9 |
\title{ Draw a Circle }
|
9 |
\title{ Draw a Circle }
|
| 10 |
\description{
|
10 |
\description{
|
| 11 |
Functions to create and draw a circle.
|
11 |
Functions to create and draw a circle.
|
| 12 |
}
|
12 |
}
|
| 13 |
\usage{
|
13 |
\usage{
|
| 14 |
grid.circle(x=0.5, y=0.5, r=0.5, default.units="npc", name=NULL,
|
14 |
grid.circle(x=0.5, y=0.5, r=0.5, default.units="npc", name=NULL,
|
| 15 |
gp=gpar(), draw=TRUE, vp=NULL)
|
15 |
gp=gpar(), draw=TRUE, vp=NULL)
|
| 16 |
circleGrob(x=0.5, y=0.5, r=0.5, default.units="npc", name=NULL,
|
16 |
circleGrob(x=0.5, y=0.5, r=0.5, default.units="npc", name=NULL,
|
| Line 20... |
Line 20... |
| 20 |
\item{x}{A numeric vector or unit object specifying x-locations.}
|
20 |
\item{x}{A numeric vector or unit object specifying x-locations.}
|
| 21 |
\item{y}{A numeric vector or unit object specifying y-locations.}
|
21 |
\item{y}{A numeric vector or unit object specifying y-locations.}
|
| 22 |
\item{r}{A numeric vector or unit object specifying radii.}
|
22 |
\item{r}{A numeric vector or unit object specifying radii.}
|
| 23 |
\item{default.units}{A string indicating the default units to use
|
23 |
\item{default.units}{A string indicating the default units to use
|
| 24 |
if \code{x}, \code{y}, \code{width}, or \code{height}
|
24 |
if \code{x}, \code{y}, \code{width}, or \code{height}
|
| 25 |
are only given as numeric vectors.}
|
25 |
are only given as numeric vectors.}
|
| 26 |
\item{name}{ A character identifier. }
|
26 |
\item{name}{ A character identifier. }
|
| 27 |
\item{gp}{An object of class \code{gpar}, typically the output
|
27 |
\item{gp}{An object of class \code{gpar}, typically the output
|
| 28 |
from a call to the function \code{gpar}. This is basically
|
28 |
from a call to the function \code{gpar}. This is basically
|
| 29 |
a list of graphical parameter settings.}
|
29 |
a list of graphical parameter settings.}
|
| 30 |
\item{draw}{A logical value indicating whether graphics output
|
30 |
\item{draw}{A logical value indicating whether graphics output
|
| Line 33... |
Line 33... |
| 33 |
}
|
33 |
}
|
| 34 |
\details{
|
34 |
\details{
|
| 35 |
Both functions create a circle grob (a graphical object describing a
|
35 |
Both functions create a circle grob (a graphical object describing a
|
| 36 |
circle), but only \code{grid.circle()}
|
36 |
circle), but only \code{grid.circle()}
|
| 37 |
draws the circle (and then only if \code{draw} is \code{TRUE}).
|
37 |
draws the circle (and then only if \code{draw} is \code{TRUE}).
|
| 38 |
|
38 |
|
| 39 |
The radius may be given in any
|
39 |
The radius may be given in any
|
| 40 |
units; if the units are \emph{relative} (e.g., \code{"npc"} or
|
40 |
units; if the units are \emph{relative} (e.g., \code{"npc"} or
|
| 41 |
\code{"native"}) then the radius will be different depending on
|
41 |
\code{"native"}) then the radius will be different depending on
|
| 42 |
whether it is interpreted as a width or as a height. In such cases,
|
42 |
whether it is interpreted as a width or as a height. In such cases,
|
| 43 |
the smaller of these two values will be the result. To see the
|
43 |
the smaller of these two values will be the result. To see the
|
| 44 |
effect, type \code{grid.circle()} and adjust the size of the window.
|
44 |
effect, type \code{grid.circle()} and adjust the size of the window.
|
| 45 |
|
45 |
|
| 46 |
What happens for very small radii is device-dependent: the
|
46 |
What happens for very small radii is device-dependent: the
|
| 47 |
circle may become invisible or be shown at a fixed minimum size. As
|
47 |
circle may become invisible or be shown at a fixed minimum size. As
|
| 48 |
from \R 2.15.0, circles of zero radius will not be plotted.
|
48 |
from \R 2.15.0, circles of zero radius will not be plotted.
|
| 49 |
}
|
49 |
}
|
| 50 |
\section{Warning}{
|
50 |
\section{Warning}{
|