Draws one closed polygon per group across a set of categorical axes. Pair with coord_polar() for the familiar circular form; without it the same layer reads as a parallel-coordinates profile.

geom_radar(
  mapping = NULL,
  data = NULL,
  color = NULL,
  alpha = NULL,
  linewidth = NULL,
  points = TRUE
)

Arguments

mapping, data

Standard layer overrides. Map the axes to x, the values to y, and the series to color (or group).

color

Line/fill color when color is not mapped.

alpha

Fill opacity of the polygon interior.

linewidth

Outline width in px.

points

Draw a marker at each vertex.

Value

A Layer to add with +.

Examples

d <- data.frame(
  axis = rep(c("Speed", "Power", "Range", "Cost", "Safety"), 2),
  value = c(8, 6, 7, 4, 9, 5, 9, 4, 8, 6),
  model = rep(c("A", "B"), each = 5)
)
ggnext(d, aes(axis, value, color = model)) +
  geom_radar() +
  coord_polar() +
  theme_minimal()
#> <ggnext plot>
#>   data:  10 x 3
#>   aes:   x = axis, y = value, color = model
#>   layers: 1 
#>   coord: polar
#>   mode:  static