FlowCytometryTools.FCPlate.plot

FCPlate.plot(channel_names, kind='histogram', transform=(None, None), gates=None, transform_first=True, apply_gates=True, plot_gates=True, gate_colors=None, ids=None, row_labels=None, col_labels=None, xlim=None, ylim=None, autolabel=True, **kwargs)

Produces a grid plot with each subplot corresponding to the data at the given position.

Parameters:

transform : [valid transform | tuple of valid transforms | None]

Transform to be applied to corresponding channels using the FCMeasurement.transform function. If a single transform is given, it will be applied to all plotted channels.

gates : [None | Gate | iterable of Gate]

Gate should be in [ThresholdGate, IntervalGate, QuadGate, PolyGate ]. When supplied, the gates are drawn on the plot. The gates are applied by default.

transform_first : bool

Apply transforms before gating.

channel_names : [str | iterable of str]

The name (or names) of the channels to plot. When one channel is specified, then a 1d histogram is plotted.

kind : [‘scatter’ | ‘histogram’]

Specifies the kind of plot to use for plotting the data (only applies to 2D plots).

autolabel : [False | True]

If True the x and y axes are labeled automatically.

colorbar : [False | True]

Adds a colorbar. Only relevant when plotting a 2d histogram.

xlabel_kwargs : dict

kwargs to be passed to the xlabel() command

ylabel_kwargs : dict

kwargs to be passed to the ylabel() command

Returns:

(ax_main, ax_subplots) :

ax_main : reference to the main axes ax_subplots : matrix of references to the subplots (e.g., ax_subplots[0, 3] references the subplot in row 0 and column 3.)

Examples

Below, plate is an instance of the FCOrderedCollection

>>> plate.plot(['SSC-A', 'FSC-A'], kind='histogram', transform='hlog', autolabel=True)
>>> plate.plot(['SSC-A', 'FSC-A'], transform='hlog', xlim=(0, 10000))
>>> plate.plot(['B1-A', 'Y2-A'], transform='hlog', kind='scatter', color='red', s=1, alpha=0.3)