Description Usage Arguments Details Author(s) References
This function is taken from the ggradar
package.
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)
|
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 |
grid.min |
value at which mininum grid line is plotted, default |
grid.mid |
value at which 'average' grid line is plotted, default |
grid.max |
value at which 'average' grid line is plotted, default |
centre.y |
value of y at centre of plot, default < |
plot.extent.x.sf |
controls relative size of plot horizontally, default |
plot.extent.y.sf |
controls relative size of plot vertically, default |
x.centre.range |
controls axis label alignment. Default behaviour is to left-align axis labels on left hand side of
plot ( |
label.centre.y |
whether value of y at centre of plot should be labelled, default |
grid.line.width |
Default |
gridline.min.linetype |
Default |
gridline.mid.linetype |
Default |
gridline.max.linetype |
Default |
gridline.min.colour |
Default |
gridline.mid.colour |
Default |
gridline.max.colour |
Default |
grid.label.size |
text size, default |
gridline.label.offset |
displacement to left/right of central vertical axis,
default |
label.gridline.min |
whether or not to label the mininum gridline, default |
axis.label.offset |
vertical displacement of axis labels from maximum grid line, measured relative to
circle diameter, default |
axis.label.size |
text size, default |
axis.line.colour |
line colour, default |
group.line.width |
Default |
group.point.size |
Default |
background.circle.colour |
Default |
background.circle.transparency |
Default |
plot.legend |
whether to include a plot legend, default = |
legend.title |
Default |
legend.text.size |
Default |
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.
Ricardo Bion
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.