`sc.pl.heatmap` (and others) should offer a means of accessing the `matplotlib.pyplot.Figure` object
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
if I do axs = sc.pl.heatmap(adata, show=False), scanpy kindly returns a dict of axs. I can do axs['heatmap_ax'].figure to get the figure object from one of the ax objects, because matplotlib stores a "backpointer" in the ax objects. But this isn't idiomatic: we think of Figures containing Axes, not the other way around.
I think there should be a way to return the fig object from scanpy's plotting functions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at sc.pl.heatmap with show=False and inspect the returned axs dictionary, especially heatmap_ax and its figure backpointer. Compare the plotting functions implied by “and others” and determine a consistent Figure-return contract; done means callers can access the Figure directly without relying on an Axes backpointer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100