Learn R Programming

henna (version 0.3.4)

radialPlot: Draw radial plot for a data frame with positive integer-valued points

Description

This function draws a radial plot for a data frame, plotting positive integer-valued points over concentric circles, with points located more centrally representing higher values.

Usage

radialPlot(
  valuesDF,
  title = "Radial plot",
  valueLegendTitle = "Value",
  groupLegendTitle = "Group",
  extraCircles = 0,
  palette = rpColors(length(unique(valuesDF[, 3]))),
  labelSize = 3,
  pointSize = 0.8,
  legendTitleSize = 10,
  legendTextSize = 10,
  labelRepulsion = 1,
  labelPull = 0,
  maxOverlaps = 15,
  breakDensity = 6,
  seed = 50,
  ...
)

Value

An object of class gg.

Arguments

valuesDF

A data frame with names on the first column and positive integers on the second column.

title

Plot title.

valueLegendTitle

Legend title corresponding to the positive integer column.

groupLegendTitle

Legend title corresponding to the categorical column.

extraCircles

Number of circles drawn beyond those required to include the points.

palette

Color palette.

labelSize

Label size.

pointSize

Point size.

legendTitleSize

Legend title size.

legendTextSize

Legend text size.

labelRepulsion

Repulsion strength between labels.

labelPull

Attraction strength between a text label and its data point.

maxOverlaps

Maximum overlaps. Ignored if labelDF is NULL.

breakDensity

Factor used in calculating the number of breaks for the values legend. Higher values of this argument add more breaks to the legend, but no breaks at a distance below 1 will be allowed.

seed

Random seed.

...

Other arguments passed to centerTitle.

Examples

Run this code
valuesDF <- data.frame(Protein = paste0('P', seq(20)),
Value = sample(10, 20, replace=TRUE),
Group = sample(3, 20, replace=TRUE))
radialPlot(valuesDF)

Run the code above in your browser using DataLab