ggradar2: ggradar2

View source: R/ggradar2.R

ggradar2R Documentation

ggradar2

Description

ggradar2

Usage

ggradar2(
  plot.data,
  base.size = 20,
  axis.labels = "",
  grid.min = 0,
  grid.max = 1,
  centre.y = grid.min - ((1/9) * (grid.max - grid.min)),
  label.centre.y = FALSE,
  grid.line.width = 0.5,
  grid.line.trend = "classic",
  gridline.min.linetype = "longdash",
  gridline.mid.linetype = "longdash",
  gridline.max.linetype = "longdash",
  gridline.min.colour = "grey",
  gridline.mid.colour = "#007A87",
  gridline.max.colour = "grey",
  grid.label.size = 6,
  gridline.label.offset = -0.1 * (grid.max - centre.y),
  label.gridline.opener = TRUE,
  gridline.label = seq(0, 100, 20),
  gridline.label.type = "percentage",
  axis.label.offset = 1.15,
  axis.label.size = 5,
  axis.line.colour = "grey",
  group.line.width = 1.5,
  group.point.size = 3,
  group.colours = NULL,
  group.fill.colours = NULL,
  background.circle.colour = "#D7D6D1",
  background.circle.transparency = 0.2,
  legend.title = "",
  plot.legend = TRUE,
  plot.title = "",
  legend.text.size = 14,
  radarshape = "round",
  polygonfill = TRUE,
  polygonfill.transparency = 0.2,
  multiplots = FALSE,
  stripbackground = TRUE,
  fullscore = NULL,
  axis.labels.color = "black",
  grid.labels.color = "black",
  ci = FALSE
)

Arguments

plot.data

The input data should be in the data.frame format with columns named. The values in the data are supposed to be numeric. The ‘group’ column is suggested to included in your data. ggradar2 now can smartly detect if ‘group’ is correctly provided. If not, you will be asked if the first column is allowed to be defined as the group column. If you want to plot multiple plots against some subgroups, please specify it in the column data$facet1.

base.size

The size of radar chart. The default value is 20.

axis.labels

The label of each column in your data is plotted around the radar.

grid.min, grid.max

Rescale your values in this range.

centre.y

The radius of inner circle.

label.centre.y

TRUE prints the central value. FALSE turns it off.

grid.line.width

The width of grid lines.

grid.line.trend

"classic" sets equal width of the grid lines. "increase" sets an outward-increasing width of the grid lines. "decrease" sets an outward-decreasing width of the grid lines.

gridline.min.linetype, gridline.mid.linetype, gridline.max.linetype

Set the grid line type for the inner, middle and outer circles. The default setting is "longdash".

gridline.min.colour, gridline.mid.colour, gridline.max.colour

Set the colors for the inner, middle and outer circles. The default settings are "grey", "#007A87", "grey".

grid.label.size

Set the size of grid labels.

gridline.label.offset

The offset of grid labels.

label.gridline.opener

Turn on/off the labels at the inner grid, middle grid and outer grid.

gridline.label

The default setting is the percentage. Replace it with your labels for circle lines.

gridline.label.type

The type of labels of the circle lines, i.e. percentage or numeric.

axis.label.offset

The offset of axis labels.

axis.label.size

The size of axis labels.

axis.line.colour

The color of axis labels.

group.line.width

The width of group lines.

group.point.size

The size of the point in each axis for group lines.

group.colours

Set colors for the group lines.

group.fill.colours

The colors of polygon fills.

background.circle.colour

The background color for the radar.

background.circle.transparency

The transparency of the background.

legend.title

Legend title.

plot.legend

TRUE/FALSE.

plot.title

Plot title.

legend.text.size

The size of the legend text.

radarshape

"round" gives you a round radar. "sharp" gives you a sharp radar.

polygonfill

Turn on/off the polygon fill. TRUE/FALSE.

polygonfill.transparency

The transparency of polygon fills.

multiplots

Turn on/off multi-plotting function. If on, data$facet1 column should be included in your data. TRUE/FALSE

stripbackground

Turn on/off the background for the panels of multiple plots.

fullscore

Set full scores to your values.

ci

The confidence interval indicates the higher and lower boundaries.

axis.label.color, grid.label.color

Change the colors of the axis labels and grid labels.

Author(s)

Liang Xu

Examples

library(ggradar2)
library(ggplot2)
data(mtcars)
ggradar2(mtcars)

xl0418/ggradar2 documentation built on Sept. 1, 2022, 2:37 a.m.