Create Biplot
Usage
create.biplot(
plot.data,
x.dim,
y.dim,
asp,
variants = NULL,
spread.kappa = 2,
x.lab = NULL,
y.lab = NULL,
x.min = -5000,
x.max = asp$expr.data.max,
y.min = -5000,
y.max = asp$expr.data.max,
x.width.basis = -1000,
y.width.basis = -1000,
max.points = 5e+05,
color.palette = "rainbow",
save = TRUE,
title = NULL,
output.dir = NULL,
width = 5,
height = 5
)Arguments
- plot.data
A matrix or dataframe containing the flow cytometry data to be plotted. Column names should match the dimensions specified by
x.dimandy.dim.- x.dim
String specifying the column of
plot.datafor the x-axis of the plot.- y.dim
String specifying the column of
plot.datafor the y-axis of the plot.- asp
The AutoSpectral parameter list.
- variants
The variant list returned by
get.spectral.variants(). When supplied, red curves are drawn for whichever ofx.dim/y.dimvariants$thresholdscovers: each channel's flat threshold (variants$thresholds) plusspread.kappaspread standard deviations from the other axis's own spillover into it (variants$spillover.spread), and, below zero, the same spread widening subtracted from the directly measured negative-tail flat threshold (variants$neg.thresholds) rather than mirrored from the positive curve about zero. Falls back to the mirrored positive threshold, with a warning, whenvariants$neg.thresholdsis absent (an older cachedvariantsobject). This is the one-source restriction ofget.spread.thresholds()'s formula to whichever fluorophore the other axis actually shows - contributions from every other fluorophore in the panel are not visualisable on a 2D plot and are not included.NULL(default) draws no reference curves.- spread.kappa
Numeric, spread standard deviations allowed above the flat threshold when
variantsis supplied - seeget.spread.thresholds(). Default2.- x.lab
An optional label for the x-axis. If none is given (default
NULL), the column name specified byx.dimwill be used.- y.lab
An optional label for the y-axis. If none is given (default
NULL), the column name specified byy.dimwill be used.- x.min
Minimum value for the x-axis. Default is
-5000.- x.max
Maximum value for the x-axis. Default is the value specified by asp$expr.data.max, which will be the maximum for the cytometer.
- y.min
Minimum value for the y-axis. Default is
-5000.- y.max
Maximum value for the y-axis. Default is the value specified by asp$expr.data.max, which will be the maximum for the cytometer.
- x.width.basis
Width basis for the biexponential transform for the x-axis. Default is
-1000.- y.width.basis
Width basis for the biexponential transform for the x-axis. Default is
-1000.- max.points
Number of points to plot (speeds up plotting). Default is
5e6.- color.palette
Optional character string defining the viridis color palette to be used for the fluorophore traces. Default is
rainbow, which will be similar to FlowJo or SpectroFlo. Other pptions are the viridis color options:magma,inferno,plasma,viridis,cividis,rocket,makoandturbo.- save
Logical, if
TRUE, saves a JPEG file to theoutput.dir. Otherwise, the plot will simply be created in the Viewer.- title
Optional title for the plot filename. If
NULL, defaults tox.labvs.y.lab.- output.dir
Optional output directory. Default is NULL, in which case the current working directory will be used.
- width
Numeric, width of the saved plot. Default is
5.- height
Numeric, height of the saved plot. Default is
5.