stlearn.pl.lr_n_spots

stlearn.pl.lr_n_spots(adata, n_top: int = 100, font_dict: Optional[dict] = None, xtick_dict: Optional[dict] = None, bar_width: float = 1, max_text: int = 50, non_sig_color: str = 'dodgerblue', sig_color: str = 'springgreen', figsize: tuple = (6, 4), show_title: bool = True, show: bool = True)[source]

Bar plot showing for each LR no. of sig versus non-sig spots.

Parameters:
  • adata (AnnData) – Data on which st.tl.cci.run has been applied.

  • n_top (int) – The no. of LRs to display, ranked by adata.uns[‘lr_summary’]

  • font_dict (dict) – dictionary specifying matplotlib font parameters e.g. weight.

  • xtick_dict (dict) – dictionary specifying matplotlib font parameters for x labels e.g. weight.

  • bar_width (int) – Width of each bar in the bar plot.

  • max_text (int) – If n_top exceeds this number, stop showing the LR text, since can cause crowding.

  • non_sig_color (str) – Specifies the color for bar plot proportion indicating no. of non-sig spots.

  • sig_color (str) – Specifies color for bars indicating the sig. spots counts.

  • figsize (tuple) – Specifies figure dimensions.

  • show_title (bool) – Whether to show title on outputted plot.

  • show (bool) – Whether to show the plot; if false returns the figure & axes for further modification.

Returns:

Figure & axes with the plot draw on; only if show=False. Else None.

Return type:

Fig, Axes