Skip to content

docs: add inline example plot to sc.pl.scatter#4078

Open
CuiweiG wants to merge 2 commits intoscverse:mainfrom
CuiweiG:docs/inline-plot-scatter
Open

docs: add inline example plot to sc.pl.scatter#4078
CuiweiG wants to merge 2 commits intoscverse:mainfrom
CuiweiG:docs/inline-plot-scatter

Conversation

@CuiweiG
Copy link
Copy Markdown

@CuiweiG CuiweiG commented Apr 21, 2026

Part of the inline-example effort in #1664. Adds a rendered .. plot:: to sc.pl.scatter's docstring: a QC scatter (total counts vs detected genes, colored by mitochondrial fraction) on pbmc68k_reduced, which already carries the three required .obs columns so no preprocessing is needed.

Local verification

  • pre-commit run --files src/scanpy/plotting/_anndata.py — all hooks pass
  • pytest tests/test_plotting.py -k scatter — 35/35 passed
  • Manually ran the example with show=False against current main; no errors

Refs #1664

The scatter docstring had no rendered example plot. Add one
covering the two-continuous-variable case (counts vs genes,
colored by a QC metric), using pbmc68k_reduced so no
preprocessing is needed.

Refs scverse#1664
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.60%. Comparing base (9909599) to head (bbd551c).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4078   +/-   ##
=======================================
  Coverage   78.60%   78.60%           
=======================================
  Files         118      118           
  Lines       12755    12753    -2     
=======================================
- Hits        10026    10025    -1     
+ Misses       2729     2728    -1     
Flag Coverage Δ
hatch-test.low-vers 77.91% <ø> (+<0.01%) ⬆️
hatch-test.pre 78.49% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/scanpy/plotting/_anndata.py 85.42% <ø> (ø)

... and 7 files with indirect coverage changes

@CuiweiG
Copy link
Copy Markdown
Author

CuiweiG commented Apr 21, 2026

Hi @flying-sheep, I just pushed a release note fragment to fix the validation check. Could this also be assigned to a milestone when you have a moment? Thanks!

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