sainsc.LazyKDE.plot_genecount

sainsc.LazyKDE.plot_genecount(*, gene=None, crop=None, scalebar=True, im_kwargs=dict(), scalebar_kwargs=_SCALEBAR)

Plot the gene expression counts.

By default this will plot the sainsc.LazyKDE.total_mRNA. If gene is specified the respective gene will be plotted.

Parameters:
  • gene (str, optional) – Gene in sainsc.LazyKDE.genes to use for plotting.

  • crop (tuple[tuple[int, int], tuple[int, int]], optional) – Coordinates to crop the data defined as ((xmin, xmax), (ymin, ymax)).

  • scalebar (bool, optional) – If True, add a matplotlib_scalebar.scalebar.ScaleBar to the plot.

  • im_kwargs (dict[str, Any], optional) – Keyword arguments that are passed to matplotlib.pyplot.imshow().

  • scalebar_kwargs (dict[str, Any], optional) – Keyword arguments that are passed to matplotlib_scalebar.scalebar.ScaleBar.

Return type:

Figure

Raises:

ValueError – If sainsc.LazyKDE.total_mRNA has not been calculated.