Description Usage Arguments Details Value See Also Examples
This function plots rectangles.
1 |
mapping |
Mapping between variables and aesthetics generated by aes. See Details. |
data |
Dataset used in this layer. |
... |
Optional arguments. |
It plots rectangles. The following aesthetics are required:
xmin
ymin
xmax
ymax
Additionally, you can use the aesthetics of geom_rect
,
geom_path
, and pointssegment
.
A layer with the rectangles.
1 2 3 4 5 6 7 8 9 | 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
|
Loading required package: ggplot2
Loading required package: extrafont
Registering fonts with R
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Warning: Ignoring unknown aesthetics: xbegin, ybegin, xend, yend, xmin, xmax, ymin, ymax
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.