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.
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)")
)List with two elements:
List of lists, arguments for bubbleHeatmap
List of arguments for bubbleHMLegends
The list returned by this plot can be passed directly to
bubbleHeatmapList to produce a list of plot trees.
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.
Logical, apply Nightingale style template?
Vector of names for gTrees output by bubbleHeatmap, if not
supplied then names(colorList) will be used.
gpar object to provide drawing context.
Will be applied to the parent viewport in the childrenvp slot of gTrees
output by bubbleHeatmap.
Vector of colors to distribute over color scale gradient.
unit object indicating the size of one
plot grid square.
Maximum diameter of bubbles as multiple of unitBase.
Numeric vectors indicating limits (min/max) beyond which the values of color/size matrices should be truncated.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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).
Character vector of legend titles. First string should be the size legend title, second for the color legend.
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.
Other build functions:
bubbleHMLegends(),
bubbleHeatmapList(),
bubbleHeatmap()