Skip to contents

Use the same specification for data, grid and label layers. Its axis order, angular direction and common or per-axis scales are applied in every panel. Limits table rows are matched by axis ID and stored in drawing order.

Usage

radar_spec(axes, limits, start = 0, direction = 1)

Arguments

axes

A character vector of at least three unique axis IDs in drawing order.

limits

Two finite, increasing numbers for one shared scale, or a data frame with axis, lower and upper columns for per-axis scales. In the table, give each axis ID exactly once. Bounds use the original units and must be finite, increasing and have a finite span. An optional breaks list-column supplies distinct, in-range tick values for each axis. Use NULL for default ticks or numeric(0) to omit an axis's ticks. When the entire limits argument is NULL, one range covers zero and all observed values. Supply explicit bounds when comparing separate figures.

start

Starting angle in radians measured clockwise from the top.

direction

Use 1 for clockwise or -1 for counterclockwise.

Value

A radar specification for geom_radar(), stat_radar(), geom_radar_grid() and geom_radar_label().

Examples

radar_spec(c("Detection", "Laboratory", "Response"), c(0, 100))
#> $axes
#> [1] "Detection"  "Laboratory" "Response"  
#> 
#> $limits
#> [1]   0 100
#> 
#> $start
#> [1] 0
#> 
#> $direction
#> [1] 1
#> 
#> attr(,"class")
#> [1] "forma_radar_spec"