stat_spoke {ggplot2} | R Documentation |
Convert angle and radius to xend and yend
stat_spoke(mapping=NULL, data=NULL, geom="segment", position="identity", ...)
mapping |
mapping between variables and aesthetics generated by aes |
data |
dataset used in this layer, if not specified uses plot dataset |
geom |
geometric used by this layer |
position |
position adjustment used by this layer |
... |
ignored |
This page describes stat_spoke, see layer
and qplot
for how to create a complete plot from individual components.
A layer
The following aesthetics can be used with stat_spoke. Aesthetics are mapped to variables in the data with the aes
function: stat\_spoke(\code{aes}(x = var))
x
: x position (required)
y
: y position (required)
angle
: angle (required)
radius
: NULL (required)
xend
: NULL
yend
: NULL
Hadley Wickham, http://had.co.nz/
## Not run: df <- expand.grid(x = 1:10, y=1:10) df$angle <- runif(100, 0, 2*pi) df$speed <- runif(100, 0, 0.5) qplot(x, y, data=df) + stat_spoke(aes(angle=angle), radius = 0.5) qplot(x, y, data=df) + stat_spoke(aes(angle=angle, radius=speed)) ## End(Not run)