Add a radar coordinate system useful for radar charts.

coord_radar(theta = "x", start = 0, direction = 1, ...)

Arguments

theta

variable to map angle to (x or y)

start

Offset of starting point from 12 o'clock in radians. Offset is applied clockwise or anticlockwise depending on value of direction.

direction

1, clockwise; -1, anticlockwise

...

Other arguments to be passed to ggproto.

Examples

# Create a radar/spider chart with ggplot: if (require("dplyr") && require("tidyr") && require("ggplot2")) { data <- iris %>% group_by(Species) %>% summarise_all(mean) %>% pivot_longer(-Species) data %>% ggplot(aes(x = name, y = value, color = Species, group = Species)) + geom_polygon(fill = NA, size = 2) + coord_radar(start = -pi / 4) }
#> Loading required package: dplyr
#> #> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’: #> #> filter, lag
#> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union
#> Loading required package: tidyr
#> Loading required package: ggplot2