Conversation
…ting normalization for categorical colormap and non-linear norm method (this avoids calling _colorize again which ends up calling _get_normalization a second time) This avoids a bug that creates an extra overlay image (matplotlib artist) that is not included in the _mpl_artists dictionary. The practical effect of this is having a fixed, always shown, histogram color overlay.
…en updating other properties, update the internal variables, but don't display them until `overlay_visible` is `True` Add `self._scatter_overlay_rgba` to `Scatter` and `self._overlay_histogram_rgba` to `Histogram2D`. Add `_update_overlay_visibility` helper method to both classes.
…ist should or not be mad visible
…olor_indices` would be `None` and/or `self._scatter_overlay_rgba` would be `None`)
There was a problem hiding this comment.
Pull Request Overview
This PR improves the overlay handling logic for active artists and refines documentation and code clarity across the biaplotter library. Key changes include:
- Simplified signal connection in _connect_signals.
- Updated docstrings in artists_base.py to generalize their scope.
- Enhanced _set_active_artist to conditionally show overlays based on show_color_overlay, and updated the library version.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/biaplotter/plotter.py | Simplified signal connection, refined overlay logic in _set_active_artist, and updated deprecated method formatting. |
| src/biaplotter/artists_base.py | Generalized docstrings for data and visible setters. |
| src/biaplotter/init.py | Updated the library version to 0.3.1. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #51 +/- ##
==========================================
+ Coverage 90.47% 90.83% +0.36%
==========================================
Files 9 9
Lines 976 982 +6
==========================================
+ Hits 883 892 +9
+ Misses 93 90 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@zoccoler Checking the functionality on the clusters-plotter end again with these changes and thinking about it again, I'd be fine with waving it through. If some things can be refactored, this can be done later, too. I'll keep the refactoring to the clusters-plotter and will just wave this through, if you don't mind? |
No problem. In any case, I think #53 solves it without breaking it as before. We were close. |
Move overlay_visible functionality to _colorize
show_color_overlay (property reflecting ToggleButton state)show_color_overlay (property reflecting ToggleButton state)
This pull request includes several updates to improve code clarity, maintainability, and functionality in the
biaplotterlibrary. The most important changes are improving the behavior of artist visibility and overlay handling.General Updates:
0.3.0to0.3.1insrc/biaplotter/__init__.py.Documentation Improvements:
datasetter insrc/biaplotter/artists_base.pyto reflect that it applies to all artists, not just scatter plots.visiblesetter insrc/biaplotter/artists_base.pyto generalize its scope to all artists.hide_color_overlaymethod insrc/biaplotter/plotter.pyfor consistency.Functional Improvements:
_set_active_artistinsrc/biaplotter/plotter.pyto conditionally show the overlay of the active artist only whenshow_color_overlayis enabled.Code Cleanup:
_connect_signalsby collapsing a multi-line statement into a single line insrc/biaplotter/plotter.py.