Merged
Conversation
Co-Authored-By: Marcelo Zoccoler <26173597+zoccoler@users.noreply.github.com>
Co-Authored-By: Marcelo Zoccoler <26173597+zoccoler@users.noreply.github.com>
…ethods Co-Authored-By: Marcelo Zoccoler <26173597+zoccoler@users.noreply.github.com>
Co-Authored-By: Marcelo Zoccoler <26173597+zoccoler@users.noreply.github.com>
…_on_plot` to handle coloring
…flag to True to avoid showing warning on default overlay_colormap
This avoids a bug that would color a bin with a different color when the median is calculated over an even number of elements and the middle elements are different. For example, the median of [1, 1, 3, 3] would be 2. This has the effect of painting that bin with color number 2, which was never assigned by the user. To avoid this, we chose here to always get the lower median (1 in this example).
Co-Authored-By: Marcelo Zoccoler <26173597+zoccoler@users.noreply.github.com>
Co-Authored-By: Marcelo Zoccoler <26173597+zoccoler@users.noreply.github.com>
…catter Co-Authored-By: Marcelo Zoccoler <26173597+zoccoler@users.noreply.github.com>
Co-Authored-By: Marcelo Zoccoler <26173597+zoccoler@users.noreply.github.com>
Co-Authored-By: Marcelo Zoccoler <26173597+zoccoler@users.noreply.github.com>
Co-Authored-By: Marcelo Zoccoler <26173597+zoccoler@users.noreply.github.com>
Contributor
Author
|
@zoccoler I think this is good to go. I fixed the tests and updated the documentation notebooks 👍 |
Equal sometimes fails and results in super-weird aspect ratios.
…vior - 0.0.5alpha)
zoccoler
approved these changes
Apr 24, 2025
Contributor
|
Hi @jo-mueller , I approved the changes and added back the functionality of Minor updates are:
If you agree, please merge and I am also in favor of making the new release right after that. |
Contributor
Author
|
@zoccoler Awe-some! Will merge and release and then be able to merge a bunch of stuff right after that for the clusters-plotter 👍 |
This was referenced May 6, 2025
Closed
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.
Hi @zoccoler ,
here comes the result of my works in synchronizing functionality between the scatter and the histogram. The key changes are the
_create_plot()function that creates the plot. I added new functions_draw_selection_on_plotandcolor_indices_to_rgbawhich, as the name suggests, handle the overlay drawing and make it easier to retrieve thecolor_indicesas rgba values without the need to access private methods.I also replaced some code by functions I found elsewhere. For the statistical histogram, for instance, there's a scipy function that essentially does that :)
PS: Tests haven't been updated yet (WIP) and will likely fail.
Long copilot description
This pull request introduces a new abstract base class,
Artist, in thesrc/biaplotter/artists_base.pyfile. The class is designed to serve as a foundation for creating customizable plotting components in the BiAPlotter framework. It provides a structured interface for managing data, colormaps, and visibility, while also emitting signals for changes in data and color indices.New Abstract Base Class for Plotting (
Artist)Artistclass, which inherits fromABCand defines an interface for plotting components. It includes parameters for axes (ax), data (data), colormaps (overlay_colormap), and color indices (color_indices).data_changed_signalandcolor_indices_changed_signalto notify changes in thedataandcolor_indicesproperties, respectively._create_plot,_draw_selection_on_plot, andcolor_indices_to_rgba—to enforce implementation in derived classes.Plot Management and Customization
_update_axes_limits,_modify_plot, and_remove_artiststo dynamically adjust axes limits, modify plots, and remove plot elements.