pytometry.plotting.scatter_density#
- pytometry.plotting.scatter_density(adata, x='FSC-A', y='SSC-A', x_label=None, y_label=None, x_scale='linear', y_scale='linear', x_lim=None, y_lim=None, ax=None, cmap='jet', vmin=None, vmax=None, *, layer=None)#
Plots the cell density across two adata.obs.
- Parameters
adata (AnnData) – AnnData object containing data.
x (str) – adata.obs to plot on x axis. Defaults to ‘FSC-A’
y (str) – adata.obs to plot on x axis. Defaults to ‘SSC-A’.
x_label (str) – x axis label.
y_label (str) – y axis label.
x_scale (str{“linear”, “log”, “symlog”, “logit”, …}) – x axis scale type to apply. Defaults to ‘linear’.
y_scale (str{“linear”, “log”, “symlog”, “logit”, …}) – y axis scale type to apply. Defaults to ‘linear’.
x_lim (list) – upper and lower limit of the x axis.
y_lim (list) – upper and lower limit of the y axis.
ax (
matplotlib.Axes
) – Axes to draw into. If None, create a new figure or usefignum
to draw into an existing figure.cmap (str or list or
matplotlib.colors.Colormap
) – For scalar aggregates, a matplotlib colormap name or instance. Alternatively, an iterable of colors can be passed and will be converted to a colormap. Defaults to ‘jet’.vmin, vmax (float) – For scalar aggregates, the data range that the colormap covers. If vmin or vmax is None (default), the colormap autoscales to the range of data in the area displayed, unless the corresponding value is already set in the norm.
layer – layer in
adata
to use. IfNone
, useadata.X
.
- Returns
Scatter plot that displays cell density