tools.dotplot_2obs

tools.dotplot_2obs(adata, gene, x_axis, y_axis, x_order=None, y_order=None, use_raw=True, fill_na=True, show_plot=True, **kwargs)[source]

A function that extracts the expression for a provided gene, and subsequently prepares a dotplot where the two axes are two categoricals from the obs of the object.

Can be controlled between .raw and .X via use_raw (defaults to raw) By default fills nonexistent obs combinations as zeroes in the plot (as otherwise the plot can error in weird ways sometimes).

Thanks kp9!