Skip to content

Comments

Plotting rework 2: add new plotting functions (and improve some old ones)#182

Merged
casblaauw merged 9 commits intov2.0from
plotting_functions
Feb 5, 2026
Merged

Plotting rework 2: add new plotting functions (and improve some old ones)#182
casblaauw merged 9 commits intov2.0from
plotting_functions

Conversation

@casblaauw
Copy link
Collaborator

@casblaauw casblaauw commented Feb 5, 2026

NOTE: this looks like an insane amount of commits until #166 is merged into v2.0.

  • Add crested.pl.scatter.gini_filtering: a plotting function that visualizes the effects of different cutoffs in crested.pp.filter_regions_on_specificity().
image
  • Add crested.pl.scatter.region: a function to plot ground truth vs pred for a single region as a scatter, especially useful for models with many classes.
image
  • Improve crested.pl.bar.region:
    • We allow it to take prediction values without an adata too. This prevents the duplication with crested.pl.bar.prediction, and provides a one-stop-shop for plotting a single region's values as a barplot.
    • Also add a log_transform option to align with all other plotting functions.
  • Improve crested.pl.scatter.class_density:
    • If square=True, this now manually calculates and sets axis limits to ensure the y=x identity diagonal runs exactly through the corners of the plot. I did a TON of testing and googling to get this to work with aspect ratios (and made a stackoverflow account for it), but just couldn't get it to work with that. This works, even with multiple-model plots.

Fixes #177 (except for the heatmaps with row/col_colors support, I'd like to get to that later.)

@casblaauw casblaauw changed the title Plotting rework 1: add new plotting functions (and improve some old ones) Plotting rework 2: add new plotting functions (and improve some old ones) Feb 5, 2026
@casblaauw casblaauw merged commit 9640698 into v2.0 Feb 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant