Add ax parameter to yasa.topoplot#244
Merged
Merged
Conversation
raphaelvallat
commented
Mar 29, 2026
| |---|-------|--------|-------| | ||
| | 6 | **Log transformation** missing | ⚠️ Deferred | Planned: `log_transform` param + Euser et al. (2008) back-transform. Separate PR. | | ||
| | 7 | **Individual discrepancy heatmap** (`indDiscr.R`) | ❌ | No equivalent; data available via `get_sleep_stats()` | | ||
| | 8 | **Bug in standalone `groupDiscr.R:117`** (reference code, not YASA) | — | `logTransf=FALSE` should be `TRUE`. Bug in the R file, not YASA | |
Owner
Author
There was a problem hiding this comment.
This bug has been fixed in the latest version of the Menghini pipeline — I was using an outdated version
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #244 +/- ##
==========================================
- Coverage 92.57% 92.41% -0.17%
==========================================
Files 13 13
Lines 2814 2820 +6
Branches 383 385 +2
==========================================
+ Hits 2605 2606 +1
- Misses 153 156 +3
- Partials 56 58 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Closes #237
Summary
axkeyword argument toyasa.topoplot()so the plot can be drawn on a caller-suppliedmatplotlib.axes.Axes(e.g. a subplot cell).ax=None(default), behaviour is identical to before — a new figure is created usingfigsizeanddpi.axis provided, the figure is retrieved viaax.get_figure()and the colorbar is placed withfig.colorbar(..., ax=ax)so it adapts to the subplot layout automatically.Usage
Changes
src/yasa/plotting.pyax=Noneparameter, subplot-aware colorbar logic, and a new docstring example