multiPlotInput {bubbleHeatmap}R Documentation

Arrange bubbleHeatmap Arguments in Lists for Building Multiple Plots.

Description

Build bubbleHeatmap arguments into a list of lists to facilitate building of multiple plots in a single call. It is useful for creating sets of plots with the same data scales, similar plots with minor differences in settings, or the supplied Nightingale plot template.

Usage

multiPlotInput(
  colorList,
  sizeList = colorList,
  nightingale = TRUE,
  treeNames = names(colorList),
  context = gpar(cex = 0.8),
  colorSeq = c("#053061", "#2166AC", "#4393C3", "#92C5DE", "#D1E5F0", "#FDDBC7",
    "#F4A582", "#D6604D", "#B2182B", "#67001F"),
  unitBase = unit(0.5, "cm"),
  diameter = 0.8,
  colorLim = c(NA, NA),
  sizeLim = c(NA, NA),
  showTopLabels = TRUE,
  showLeftLabels = TRUE,
  leftLabelsTitles = FALSE,
  showRowBracket = FALSE,
  rowTitles = FALSE,
  showColBracket = FALSE,
  colTitles = FALSE,
  plotTitles = FALSE,
  xTitles = FALSE,
  yTitles = FALSE,
  showColorLegend = TRUE,
  showBubbleLegend = TRUE,
  colorBreaks = NULL,
  sizeBreaks = NULL,
  legendHeight = nrow(colorList[[1]]),
  legendTitles = c(expression("-log"[10] * "P"), "Estimate (SD)")
)

Arguments

colorList, sizeList

List of matrices, each item representing one plot, containing values to be plotted as the bubble color and size respectively. If sizeList is not supplied then color values will also be used for size.

nightingale

Logical, apply Nightingale style template?

treeNames

Vector of names for gTrees output by bubbleHeatmap, if not supplied then names(colorList) will be used.

context

gpar object to provide drawing context. Will be applied to the parent viewport in the childrenvp slot of gTrees output by bubbleHeatmap.

colorSeq

Vector of colors to distribute over color scale gradient.

unitBase

unit object indicating the size of one plot grid square.

diameter

Maximum diameter of bubbles as multiple of unitBase.

colorLim, sizeLim

Numeric vectors indicating limits (min/max) beyond which the values of color/size matrices should be truncated.

showTopLabels

Logical vector, should matrix column names be printed above each plot? Should have length == length(colorList) or length == 1 to use same value for all plots.

showLeftLabels

Logical vector, should matrix row names be printed above each plot? Should have length == length(colorList) or length == 1 to use same value for all plots.

leftLabelsTitles

Vector of headings to go over the row names of each plot. Character strings or FALSE for no title. A single FALSE value can also be used if no left label titles are required.

showRowBracket

Logical vector, should vertical bracket be printed to the right of each plot (to label a row of plots in a final figure layout)? Should have length == length(colorList) or length == 1 to use same value for all plots.

rowTitles

Vector of labels to be printed to the right of each plot, outside row bracket if present (to label a row of plots in a final figure layout). Character strings or FALSE for no title. A single FALSE value can also be used if no row titles are required.

showColBracket

Logical vector, should horizontal bracket be printed below each plot (to label a column of plots in a final figure layout)? Should have length == length(colorList) or length == 1 to use same value for all plots.

colTitles

Vector of labels to be printed to the right of each plot, outside col bracket if present (to label a column of plots in a final figure layout). Character strings or FALSE for no title. A single FALSE value can also be used if no column titles are required.

plotTitles

Vector of plot titles to be centered above each plot. Character strings or FALSE for no title. A single FALSE value can also be used if no plot titles are required.

xTitles

Vector of x axis titles to be printed left of LeftLabels. Character strings or FALSE for no title. A single FALSE value can also be used if no x axis titles are required.

yTitles

Vector of y axis titles to be printed above TopLabels. Character strings or FALSE for no title. A single FALSE value can also be used if no y axis titles are required.

showColorLegend, showBubbleLegend

Logicals, should a legend be produced for color scale/bubble size? If vector with length == length(colorList) then values will be input for each plot and any legends produced will be an element of a plot tree. A single TRUE value will build the legends outside the plots as separate trees.

colorBreaks, sizeBreaks

Character vectors of legend tick labels. If not supplied then these will be generated using pretty to a range outside data values (after values truncated to colorLim\sizeLim if applicable).

legendHeight

Numeric, preferred height of legends as multiple of unitBase. This will be supplied to pretty function. If sizeBreaks is supplied then this will be ignored and legend height will be length(sizeBreaks).

legendTitles

Character vector of legend titles. First string should be the size legend title, second for the color legend.

Value

List with two elements:

trees

List of lists, arguments for bubbleHeatmap

legend

List of arguments for bubbleHMLegends

The list returned by this plot can be passed directly to bubbleHeatmapList to produce a list of plot trees.

Nightingale

For more information about using the Nightingale style template, see the vignette. Requesting Nightingale style values overrides any argument for plotTitles, xTitles, yTitles, showTopLabels, showLeftLabels, leftLabelsTitles, showRowBracket, rowTitles, showColBracket, colTitles, showBubbleLegend or showColorLegend.

See Also

Other build functions: bubbleHMLegends(), bubbleHeatmapList(), bubbleHeatmap()


[Package bubbleHeatmap version 0.1.1 Index]