Skip to content

feat: Add ncols parameter to pl.paga - #4317

Open
AdvaitS wants to merge 3 commits into
scverse:mainfrom
AdvaitS:feat/paga-ncols
Open

feat: Add ncols parameter to pl.paga#4317
AdvaitS wants to merge 3 commits into
scverse:mainfrom
AdvaitS:feat/paga-ncols

Conversation

@AdvaitS

@AdvaitS AdvaitS commented Aug 22, 2026

Copy link
Copy Markdown

Summary

Adds an ncols parameter to sc.pl.paga to control the number of panels per row. When set, panels wrap into a grid (via _panel_grid) instead of the default single-row layout. ncols cannot be combined with a pre-supplied ax.

Test log

$ uv run pytest tests/plotting/legacy/test_paga.py -q
4 passed, 16 skipped in 7.04s

Allow controlling the number of panels per row in the PAGA plot.
When set, panels wrap into a grid via _panel_grid instead of the
default single-row layout. `ncols` cannot be combined with a
pre-supplied `ax`.

Closes scverse#1203
@AdvaitS AdvaitS changed the title Add parameter to Add ncols parameter to pl.paga Aug 22, 2026
@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.32%. Comparing base (e6269f5) to head (cc989d2).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/scanpy/plotting/legacy/_tools/paga.py 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4317      +/-   ##
==========================================
+ Coverage   80.08%   80.32%   +0.23%     
==========================================
  Files         133      133              
  Lines       13424    13435      +11     
==========================================
+ Hits        10750    10791      +41     
+ Misses       2674     2644      -30     
Flag Coverage Δ
hatch-test.low-vers 78.46% <80.00%> (+0.44%) ⬆️
hatch-test.pre 80.19% <86.66%> (+0.23%) ⬆️

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

Files with missing lines Coverage Δ
src/scanpy/plotting/legacy/_tools/paga.py 66.09% <86.66%> (+1.70%) ⬆️

... and 1 file with indirect coverage changes

@AdvaitS AdvaitS changed the title Add ncols parameter to pl.paga feat: Add ncols parameter to pl.paga Aug 22, 2026
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.

sc.pl.paga: TypeError: paga() got an unexpected keyword argument 'ncols'

1 participant