Add layout option to coda plot_boxplots (#718)#932
Open
emekaokoli19 wants to merge 6 commits intoscverse:mainfrom
Open
Add layout option to coda plot_boxplots (#718)#932emekaokoli19 wants to merge 6 commits intoscverse:mainfrom
emekaokoli19 wants to merge 6 commits intoscverse:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #932 +/- ##
==========================================
- Coverage 73.54% 71.94% -1.60%
==========================================
Files 48 48
Lines 5613 5746 +133
==========================================
+ Hits 4128 4134 +6
- Misses 1485 1612 +127
🚀 New features to boost your workflow:
|
updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.2 → v0.15.4](astral-sh/ruff-pre-commit@v0.15.2...v0.15.4) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix CI Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * fix CI Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net>
updates: - [github.com/biomejs/pre-commit: v2.4.4 → v2.4.6](biomejs/pre-commit@v2.4.4...v2.4.6) - [github.com/astral-sh/ruff-pre-commit: v0.15.4 → v0.15.5](astral-sh/ruff-pre-commit@v0.15.4...v0.15.5) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
docsis updatedDescription of changes
This PR adds a new
layoutparameter toplot_boxplots()in theSccodaplotting utilities.Currently, when
plot_facets=True, the number of subplot columns is determined using:where
Kis the number of cell types. This tends to produce a taller ("long") layout for the facet grid.The new
layoutparameter allows users to choose between two layouts:"long"(default): usesfloor(sqrt(K)), producing a taller layout."wide": usesceil(sqrt(K)), producing a wider layout.Example usage:
The default behavior remains unchanged to preserve backward compatibility.
This resolves #718.
Technical details
When
plot_facets=True, the column wrapping logic now depends on thelayoutargument:"long"→col_wrap = floor(sqrt(K))"wide"→col_wrap = ceil(sqrt(K))Validation is added to ensure
layoutis either"long"or"wide".The change only affects the
FacetGridlayout logic and does not impact any other functionality.Additional context
This change improves flexibility for users visualizing many cell types, where a wider layout may be preferable for readability.