Implement frameon parameter and deprecate fig in show()#573
Open
Implement frameon parameter and deprecate fig in show()#573
Conversation
frameon=False now calls ax.axis("off") matching scanpy's behavior.
The fig parameter emits a deprecation warning (it was silently ignored);
the warning is suppressed when ax is a Sequence since fig is still
required in that multi-panel path.
Closes #204
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Switch fig deprecation from logger.warning() to warnings.warn(DeprecationWarning) matching the _deprecation_alias pattern used elsewhere. Add baseline-image tests for frameon=False on single-panel and multi-panel plots. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace get_sdata_with_multiple_images fixture usage with a small helper that adds a second coordinate system to the blobs image via set_transformation. Keeps tests self-contained and consistent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Baseline images must be generated on the CI runner. Added test_plot_no_decorations combining frameon=False + title="" + colorbar=False to verify a completely clean plot output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #573 +/- ##
==========================================
+ Coverage 75.17% 75.42% +0.24%
==========================================
Files 10 10
Lines 2929 2934 +5
Branches 681 683 +2
==========================================
+ Hits 2202 2213 +11
+ Misses 445 440 -5
+ Partials 282 281 -1
🚀 New features to boost your workflow:
|
The multi-panel layout produces slight rendering differences across Python versions (RMS ~18.4 between py3.11 and py3.14). Use a custom tolerance of 20 instead of the default 15. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The multi-panel frameon=False test produced different title positions across Python versions due to bbox_inches="tight" cropping differently when axes frames are off. Adding title="" eliminates the layout-sensitive text — the behavioral multi-panel assertion already covers title handling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
frameon=Falsenow callsax.axis("off")to hide axes decorations (frame, ticks, tick labels), matching scanpy's established patternfigparameter emits a deprecation warning vialogger.warning()— it was silently ignored in all single-panel code paths. The warning is suppressed whenaxis aSequencesincefigis still required in that multi-panel pathtitle=""already suppressed titles; added test coverage