translate images through translate instead of grid#447
Merged
jo-mueller merged 3 commits intomainfrom Jul 6, 2025
Merged
Conversation
for more information, see https://pre-commit.ci
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.
This PR uses the
translateproperty to put images in a grid rather than the grid view. This makes the grid view nicer for napari>=0.6.2cc #442
This pull request introduces enhancements to the
bbbc_1_datasetfunction in thesrc/napari_clusters_plotter/_sample_data.pyfile, improving the organization of image data in a grid layout and adding new functionality for translating images and labels. Additionally, it includes a minor import update.Enhancements to
bbbc_1_datasetfunction:n_rows) and columns (n_cols) for arranging images in a grid layout. This improves the visual organization of the dataset.translate_xandtranslate_y) to position images and labels within the grid, including a margin for spacing.ldtuple_imageandldtuple_labels) to include thetranslateproperty, ensuring proper placement in the grid.napari.current_viewer.grid.enabledandnapari.current_viewer.grid.stride) to decouple the function from viewer-specific behavior.Import update:
numpy(np) import to support mathematical operations such asceilfor grid layout calculations.