sc_utils.feature_plot

sc_utils.feature_plot(adata: anndata._core.anndata.AnnData, feature: str, gridsize: tuple = (180, 70), linewidths: float = 0.15, figsize: Optional[float] = None) matplotlib.figure.Figure[source]

Plot expression of gene or feature in hexbin

Plots numeric feature value, commonly gene expression, on UMAP coordinates using hexbin. Feature is taken from adata.obs if it is found there, otherwise from adata.raw.

Parameters
  • adata – Annotated data matrix

  • feature – Name of the feature to plot

  • gridsize – Tuple of hexbin dimentions, larger numbers produce smaller hexbins

  • linewidths – Width of the lines to draw around each hexbin

  • figsize – Optional, make figure of this size

Returns

Matplotlib figure with colorbar added.