flowSetsthe idea is to horizontally stack plots of density estimates for all frames in the
flowSetfor one or several flow parameters. In the latter case, each parameter will be plotted in a separate panel, i.e., we implicitly condition on parameters.
## S3 method for class 'formula,flowSet': densityplot(x, data, ...)
prepanel.densityplot.flowset.stack(x, y, frames, overlap = 0.3, subscripts, ..., which.channel)
panel.densityplot.flowset.stack(x, y, darg = list(n = 50, na.rm = TRUE), frames, channel, overlap = 0.3, channel.name, filter = NULL, fill = superpose.polygon$col, lty = superpose.polygon$lty, lwd = superpose.polygon$lwd, alpha = superpose.polygon$alpha, col = superpose.polygon$border, groups = NULL, refline = NULL, margin = 0.005, stats = FALSE, pos = 0.5, digits = 2, abs = FALSE, fitGate = TRUE, checkName = TRUE, plotType = "densityplot", hist.type = "density", breaks = "Sturges", gp, ...)
## S3 method for class 'formula,flowFrame': densityplot(x, data, overlay = NULL, ...)
## S3 method for class 'formula,view': densityplot(x, data, ...)
## S3 method for class 'formula,flowSet': histogram(x, data, plotType, ...)
## S3 method for class 'formula,flowFrame': histogram(x, data, ...)
factor ~ parameter, where
factorcan be any of the phenotypic factors in the
phenoDataslot or an appropriate factor object and
parameteris a flow parameter. Panels for multiple parameters are drawn if the formula structure is similar to
factor ~ parameter1 + parameter2, and
factorcan be missing, in which case the sample names are used as y-variable. To facilitate programatic access, the formula can be of special structure
factor ~ ., in which case the optional
channelargument is considered for parameter selection. For the workflow methods,
xcan also be one of the several workflow objects.
darggets passed on to
filterResultListobject or a list of such objects of the same length as the
flowSet. If applicable, the gate region will be superiposed on the density curves using color shading. The software will figure out whether the
filterneeds to be evaluated in order to be plotted (in which case providing a
filterResultcan speed things up considerably).
flowViz.par.setcustomization. The relevant parameter category for density plots is
gate.densitywith available parameters
flowSet, or a factor.
[0,1]. When 'FALSE', it doesn't do anything to the margin events. When Numeric value, it indicates margin events by horizontal bars. The value of
marginis interpreted as the proportion of events on the margin over which the bars are added. E.g., a value of
0,5means to indicate margin events if there are more than
0.5times the total number of events.
1means to ignore margin events completetly. For
0bars are added even if there is only a single margin event.
logicalscalar indicating whether to display the gate as fitted 1d density gate region or simply display the gate boundaries using vertical lines. The latter would be helpful to display the gate when the gated density region is too small to see.
logicalscalar indicating whether to validity check the channel name. Default is TRUE, which consider '(' as invalid character in channel names
par.settingsfor customization of a single call or
flowViz.par.setfor customization of session-wide defaults.
xis of structure
factor ~ ..
library(flowStats) data(GvHD) GvHD <- GvHD[pData(GvHD)$Patient %in% 6:7] densityplot(~ `FSC-H`, GvHD) densityplot(~ `FSC-H` + `SSC-H`, GvHD) densityplot(~ ., GvHD[1:3]) ## include a filter densityplot(~ `FSC-H`, GvHD, filter=curv1Filter("FSC-H")) #display the gate by its boundaries with statistics densityplot(~ `FSC-H`, GvHD[1:2], filter=curv1Filter("FSC-H"),fitGate=FALSE,stats=TRUE) ## plot a single flowFrame densityplot(~ `SSC-H`, GvHD[], margin=FALSE) ## plot histogram histogram(~ `SSC-H`, GvHD[]) #default type is 'density' #change the type to 'count' and adjust breaks histogram(~ `SSC-H`, GvHD[], margin=FALSE, type = "count", breaks = 50)