Functions to create and draw crescent or gibbous moon shapes.
Usage
moonGrob(
x,
y,
ratio = 0.25,
right = TRUE,
r = 10,
angle = 0,
default.units = "npc",
size.units = "mm",
...
)
grid.moon(..., draw = TRUE)
Arguments
x
A numeric vector or unit object specifying x-locations.
y
A numeric vector or unit object specifying y-locations.
ratio
A numeric vector with values from 0 to 1 specifying the
proportion of the moons to draw.
right
A boolean vector specifying whether the moon should be filled
from the right (TRUE) or left (FALSE).
r
A numeric vector specifying the radii of the circles describing
the moons.
angle
Not used.
default.units
A string indicating the default units to use
if x, y, width, or height
are only given as numeric vectors.
size.units
A string indicating the units to use for the radii of the
moons.
...
Arguments passed on to grid::polygonGrob.
draw
A logical value indicating whether graphics output
should be produced.
Value
A grob object.
Details
Both functions create a moon grob (a graphical object describing a crescent
or gibbous moon), but only grid.moon draws the moon (and then only
if draw is TRUE).
These functions calculate a set of points describing the perimeters of the
moons and pass these points on to grid::polygonGrob.
The units in default.units and size.units can be different;
grid will add them together appropriately before drawing.