stat_spoke {ggplot2}R Documentation

stat\_spoke

Description

Convert angle and radius to xend and yend

Usage

stat_spoke(mapping = NULL, data = NULL, geom = "segment", position = "identity", 
    ...)

Arguments

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

Details

This page describes stat\_spoke, see layer and qplot for how to create a complete plot from individual components.

Value

A layer

Aesthetics

The following aesthetics can be used with stat\_spoke. Aesthetics are mapped to variables in the data with the aes function: stat\_spoke(aes(x = var))

Author(s)

Hadley Wickham, http://had.co.nz/

See Also

Examples

## 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)
last_plot() + scale_y_reverse()

qplot(x, y, data=df) + stat_spoke(aes(angle=angle, radius=speed))

## End(Not run)

[Package ggplot2 version 0.8.9 Index]