Add a radar coordinate system useful for radar charts.

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

Arguments

theta

Can be 'x' or 'y'.

start

Starting position. Best expressed in terms of pi (e.g., -pi/4).

direction

The direction of plotting. Can be 1 or -1.

...

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