Draws a radar (spider) plot with one axis per input and output, each min-max
scaled to [0, 1], and one closed polygon per DMU with straight edges.
Polygons are coloured by efficient/inefficient status. A radial counterpart to
plot_io_parcoo.
Usage
plot_io_radar(
x,
variables = "all",
efficiency = c("crs", "vrs", "none"),
orientation = "in",
labels = "none",
max.overlaps.value = 10,
transparency = 0.7,
fade = TRUE,
subtitle = NULL,
title = NULL,
interactive = FALSE,
...
)Arguments
- x
A
dea_dataobject, or a data frame coerced byas_dea_data.- variables
Which variables to show:
"all"(default),"inputs","outputs", or a vector of variable names or positions (positions index the inputs followed by the outputs).- efficiency
Efficiency model used to colour the DMUs by efficient/inefficient status:
"crs"(default),"vrs"or"none".- orientation
Measurement orientation for the efficiency scores.
- labels
DMU emphasis:
"none"(default) or"all"draw every DMU normally; the name/id of a single DMU outlines that DMU's polygon in bold so it stands out. (Variable axis labels are always shown.)- max.overlaps.value
Accepted for API consistency; unused here (default
10).- transparency
Opacity of the markers/areas, a single number in
[0, 1](default0.7).- fade
Controls the single-DMU focus view. When one DMU is given to
labels, all other marks (and, for the network plots, everything outside that DMU's sub-network; for the panel biplot, the other trajectories) are faded so the chosen DMU stands out.TRUE(default) uses a sensible fade level;FALSEdisables it; a single number in[0, 1]sets the alpha of the faded marks directly, where larger values fade them less (e.g.0.4leaves them more visible).- subtitle
Optional subtitle shown beneath the title.
- title
Optional plot title.
- interactive
Logical; if
FALSE(default) a static ggplot2 radar; ifTRUEan interactive plotlyscatterpolar.- ...
Additional arguments passed to
geom_polygon(static mode).
Examples
df <- data.frame(
dmu = paste0("D", 1:6),
i_x1 = c(4, 7, 8, 4, 2, 5),
i_x2 = c(3, 3, 1, 2, 4, 2),
o_y = c(5, 8, 6, 7, 3, 9)
)
plot_io_radar(df, efficiency = "crs")