xlGGRadar: xlGGRadar

Description Usage Arguments Details Author(s) References

View source: R/xlGGRadar.R

Description

This function is taken from the ggradar package.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
xlGGRadar(plot.data, font.radar = "Circular Air Light",
  values.radar = c("0%", "50%", "100%"),
  axis.labels = colnames(plot.data)[-1], grid.min = 0, grid.mid = 0.5,
  grid.max = 1, centre.y = grid.min - ((1/9) * (grid.max - grid.min)),
  plot.extent.x.sf = 1, plot.extent.y.sf = 1.2, x.centre.range = 0.02 *
  (grid.max - centre.y), label.centre.y = FALSE, grid.line.width = 0.5,
  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 = 7, gridline.label.offset = -0.1 * (grid.max - centre.y),
  label.gridline.min = TRUE, axis.label.offset = 1.15,
  axis.label.size = 8, axis.line.colour = "grey", group.line.width = 1.5,
  group.point.size = 6, background.circle.colour = "#D7D6D1",
  background.circle.transparency = 0.2, plot.legend = if (nrow(plot.data) >
  1) TRUE else FALSE, legend.title = "", plot.title = "",
  legend.text.size = grid.label.size)

Arguments

plot.data

dataframe comprising one row per group (cluster); col1 = group name, cols2 - n = variable values

axis.labels

names of axis labels if other than column names supplied via plot.data, default colnames(plot.data)[-1]

grid.min

value at which mininum grid line is plotted, default -0.5

grid.mid

value at which 'average' grid line is plotted, default 0

grid.max

value at which 'average' grid line is plotted, default 0.5

centre.y

value of y at centre of plot, default < grid.min

plot.extent.x.sf

controls relative size of plot horizontally, default 1.2

plot.extent.y.sf

controls relative size of plot vertically, default 1.2

x.centre.range

controls axis label alignment. Default behaviour is to left-align axis labels on left hand side of plot (x < -x.centre.range); right-align labels on right hand side of plot (x > +x.centre.range); and centre align those labels for which -x.centre.range < x < +x.centre.range

label.centre.y

whether value of y at centre of plot should be labelled, default FALSE

grid.line.width

Default 0.5

gridline.min.linetype

Default 'longdash'

gridline.mid.linetype

Default 'longdash'

gridline.max.linetype

Default 'longdash'

gridline.min.colour

Default 'grey'

gridline.mid.colour

Default 'blue'

gridline.max.colour

Default 'grey'

grid.label.size

text size, default 4

gridline.label.offset

displacement to left/right of central vertical axis, default -0.02 * (grid.max - centre.y)

label.gridline.min

whether or not to label the mininum gridline, default TRUE

axis.label.offset

vertical displacement of axis labels from maximum grid line, measured relative to circle diameter, default 1.15

axis.label.size

text size, default 3

axis.line.colour

line colour, default grey

group.line.width

Default 1

group.point.size

Default 4

background.circle.colour

Default 'yellow'

background.circle.transparency

Default 0.2

plot.legend

whether to include a plot legend, default = FALSE for one cluster; TRUE for 2+ clusters

legend.title

Default 'Cluster'

legend.text.size

Default grid.label.size = 4

Details

ggradar allows you to build radar charts with ggplot2. This package is based on Paul Williamson's code, with new aesthetics and compatibility with ggplot2 2.0. It was inspired by d3radaR, an htmlwidget built by timelyportfolio.

Plot extent - parameters to rescale the extent of the plot vertically and horizontally, in order to allow for ggplot default settings placing parts of axis text labels outside of plot area. Scaling factor is defined relative to the circle diameter (grid.max - centre.y).

Grid lines - includes separate controls for the appearance of some aspects the 'minimum', 'average' and 'maximum' grid lines.

Author(s)

Ricardo Bion

References

Most of the code and documentation is from http://rstudio-pubs-static.s3.amazonaws.com/5795_e6e6411731bb4f1b9cc7eb49499c2082.html, and the function code is taken from https://github.com/ricardo-bion/ggradar.


xinye1/xltools documentation built on Dec. 2, 2020, 7:23 p.m.