Description Usage Arguments Aesthetics Author(s) Examples
This geom lets you annotate sets of points via rectangles. The rectangles are
simply scaled to the range of the data and as with the the other
geom_mark_*()
geoms expanded and have rounded corners.
1 2 3 |
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this layer, as a string. |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
expand |
A numeric or unit vector of length one, specifying the expansion amount. Negative values will result in contraction instead. If the value is given as a numeric it will be understood as a proportion of the plot area width. |
radius |
As |
... |
other arguments passed on to |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
geom_mark_rect understand the following aesthetics (required aesthetics are in bold):
x
y
filter
color
fill
group
size
linetype
alpha
Thomas Lin Pedersen
1 2 3 | ggplot(iris, aes(Petal.Length, Petal.Width)) +
geom_mark_rect(aes(fill = Species, filter = Species != 'versicolor')) +
geom_point()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.