Description Usage Arguments Details Aesthetics Examples
Add freehand circles (default red) to a plot, similar to the style of Meta Stack Overflow (http://meta.stackexchange.com/a/19775/176330).
1 2 | geom_freehand(mapping = NULL, data = NULL, stat = "identity",
position = "identity", ...)
|
mapping |
The aesthetic mapping, usually constructed with
|
data |
A layer specific dataset - only needed if you want to override the plot defaults. |
stat |
The statistical transformation to use on the data for this layer. |
position |
The position adjustment to use for overlapping points on this layer |
... |
other arguments passed on to |
The radius
argument determines the radius of the freehand circles. It
is normalized based on the scales such that a radius of 1 takes up 1/25 of the
plot's width and height. You can also set the radius separately for the x- and
y- axes with radiusx
and radiusy
.
geom_freehand
understands the following aesthetics (required aesthetics are in bold):
x
y
alpha
colour
linetype
noisiness
radius
radiusx
radiusy
size
1 2 3 4 5 6 7 | require("ggplot2")
p <- ggplot(mtcars, aes(wt, mpg))
p + geom_point()
one_car <- mtcars[1, ]
p + geom_point() + geom_freehand(data = one_car, rx = .1, ry = .5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.