plot_radar: Plot radar

View source: R/graphics.R

plot_radarR Documentation

Plot radar

Description

Radar (spider) chart for a single profile of variables using polar coordinates.

Usage

plot_radar(data, label_x = "", label_y = "", colors = NULL)

Arguments

data

two‑column data.frame: variable name and value

label_x

x‑axis label (unused; variable names are shown around the circle)

label_y

y‑axis label

colors

line/fill color for the polygon

Details

Expects a two‑column data.frame with variable names in the first column and numeric values in the second.

Value

returns a ggplot2::ggplot graphic

Examples

data <- data.frame(name = "Petal.Length", value = mean(iris$Petal.Length))
data <- rbind(data, data.frame(name = "Petal.Width", value = mean(iris$Petal.Width)))
data <- rbind(data, data.frame(name = "Sepal.Length", value = mean(iris$Sepal.Length)))
data <- rbind(data, data.frame(name = "Sepal.Width", value = mean(iris$Sepal.Width)))

grf <- plot_radar(data, colors="red") + ggplot2::ylim(0, NA)
plot(grf)

daltoolbox documentation built on Nov. 5, 2025, 7:09 p.m.