xkcdrect {xkcd} | R Documentation |
Draw fuzzy rectangles
Description
It draws fuzzy rectangles.
Usage
xkcdrect(mapping, data, ...)
Arguments
mapping |
Mapping between variables and aesthetics generated by |
data |
Dataset used in this layer. |
... |
Optional arguments. |
Details
This function draws fuzzy rectangles.
It plots rectangles. The following aesthetics are required:
xmin
ymin
xmax
ymax
Additionally, you can use the aesthetics of geom_path
and geom_rect
.
Value
A layer.
See Also
Examples
volunteers <- data.frame(year=c(2007:2011),
number=c(56470, 56998,59686, 61783, 64251))
p <- ggplot() + xkcdrect(aes(xmin = year,
xmax= year +0.3,
ymin=number,
ymax = number + 3600),
volunteers,
fill="red", colour="black")
p
[Package xkcd version 0.0.6 Index]