scanpy
scanpy copied to clipboard
Rank_genes_groups -> does not return Axes
Please make sure these conditions are met
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of scanpy.
- [X] (optional) I have confirmed this bug exists on the main branch of scanpy.
What happened?
Function Rank_genes_groups() does not return a figure -> returns None type Cannot get Figure via plt.gcf(), plt.gca().
Potential Fix: https://github.com/scverse/scanpy/blob/main/src/scanpy/plotting/_tools/init.py Line 485: cann be extended to the following as in other functions below:
savefig_or_show(f"{key}_", show=show, save=save)
show = settings.autoshow if show is None else show
if show:
return None
return ax
Minimal code sample
fig = sc.pl.rank_genes_groups(adata, show=False)
type(fig)
#NoneType
plt.gca() -> empty axes
plt.gcf() -> empty figure
Error output
No response
Versions
-----
anndata 0.10.8
scanpy 1.10.2
-----