scverse / scverse/scanpy

PCA don't return `Axes`

Open
#1,537 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area - Plotting 🌺
Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

https://github.com/theislab/scanpy/blob/8d9eec4c4763edb4a522dbec3fa5ea48832ff0f8/scanpy/plotting/_tools/__init__.py#L139
Cant use mpl axis after pca_variance_ratio and other PCA plots in my code, because they never returns from function

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in scanpy/plotting/_tools/init.py around line 139 and inspect pca_variance_ratio and the other PCA plotting functions. Trace how their matplotlib axes are created or received and confirm what callers can access after the functions return. Done means callers can reuse the relevant Axes object after each PCA plot, with the reported plotting behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.