ggsubplot (version 0.3.1.9000)

geom_coxcomb: Coxcomb glyphs

Description

geom_coxcomb draws the type of glyph commonly called a coxcomb plot or polar area plot, popularized by Florence Nightingale.

Usage

geom_coxcomb(mapping = NULL, data = NULL, stat = "bin", position = "identity", npoints = 10, na.rm = FALSE, ...)

Arguments

mapping
The aesthetic mapping, usually constructed with aes. Only needs to be set at the layer level if you are overriding the plot defaults.
data
A layer specific dataset - only needed if you want to override the plot defaults
stat
The statistical transformation to use for this layer.
position
The position adjustment to use for overlapping points in this layer
npoints
the number of points to use when drawing the arcs with line segments. Defaults to 10.
na.rm
If FALSE (the default), removes missing values with a warning. If TRUE, silently removes missing variables.
...
other arguments passed on to layer. This can include aesthetics whose values you want to set, not map. See layer for more details.

Aesthetics

geom_coxcomb understands the following aesthetics: x, y, colour, fill, size, linetype, weight, and alpha.

Examples

Run this code
library(ggplot2)
## Coxcombs in an embedded plot
ggplot(casualties) +
  # map_afghanistan +
  geom_subplot2d(aes(lon, lat,
    subplot = geom_coxcomb(aes(angle = month, fill = month))), bins = c(15, 12), ref = NULL) +
  coord_quickmap()

Run the code above in your browser using DataLab