scPyviewer.plot_radar#

scPyviewer.plot_radar(ds, genes, group=None, scale='var', fill_alpha=0.12, linewidth=2.0, palette=None, max_groups=8, figsize=(6.4, 6.4), dpi=150, title=None, title_fontsize=12, tick_fontsize=9, gene_label_fontsize=9, legend_fontsize=8, legend_title_fontsize=9, font_family=None)[source]#

Radar (spider) plot: mean expression of several genes per group.

Each group is a polygon over the gene axes — a compact multi-gene signature comparison. With scale="var" each gene is normalised to [0, 1] across groups so axes are comparable.

Parameters:
  • genes (list[str]) – Genes forming the radial axes (3 or more recommended).

  • group (str, optional) – obs grouping column (defaults to ds.group_key).

  • scale ({"var", None}) – "var" scales each gene to [0, 1] across groups; None uses raw mean log-norm values.

  • fill_alpha (float) – Opacity of each polygon’s fill.

  • linewidth (float) – Polygon outline width.

  • palette (dict, optional) – {label: color} override.

  • max_groups (int) – Cap on the number of group polygons drawn (keeps the plot readable).

  • figsize (tuple) – Figure (width, height) in inches.

  • dpi (int) – Resolution.

  • title (str, optional) – Figure title.

  • title_fontsize (float) – Font sizes for title, radial ticks, and gene axis labels.

  • tick_fontsize (float) – Font sizes for title, radial ticks, and gene axis labels.

  • gene_label_fontsize (float) – Font sizes for title, radial ticks, and gene axis labels.

  • legend_fontsize (float) – Legend font sizes.

  • legend_title_fontsize (float) – Legend font sizes.

  • font_family (str, optional) – Font family for this figure only.

  • ds (Dataset)