Skip to content

Fix features_scatter_widget unpredictable behaviour #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ruaridhg opened this issue May 19, 2023 · 2 comments · Fixed by #121
Closed

Fix features_scatter_widget unpredictable behaviour #129

ruaridhg opened this issue May 19, 2023 · 2 comments · Fixed by #121
Assignees

Comments

@ruaridhg
Copy link
Collaborator

ruaridhg commented May 19, 2023

In test_scatter, ScatterWidget was tested by adding 2 images layers and viewer.layer.selection.add(viewer.layers[ind] to select both images which appears to work as expected.

FeaturesScatterWidget was tested by adding an image, a labels and a points layers. The labels and a points layer both have associated features.
It is possible to plot feature_1 vs feature_0 for the points layer. However, both the labels and the points layer need to be selected for this to work, otherwise a blank figure is returned.

Another odd feature is that when adding the selection of the points and the label layers, the order is inconsistent and the FeaturesScatterWidget only recognises the first layer.

So it appears that a 2nd layer needs to be selected (even if it's not used) so a blank figure is not returned and the FeaturesScatter plot only uses features in the 1st selected layer.

@ruaridhg
Copy link
Collaborator Author

Issues mentioned in the initial description are mainly fixed:

  • Only 1 image needs to be added without 2nd redundant image layer
  • Order consistency between layers

Remaining issue:

  • feature_0 v feature_0 being plotted instead of feature_0 v feature_1

@ruaridhg ruaridhg moved this from Done to In Progress in napari-matplotlib plugin accelerator May 31, 2023
@dstansby
Copy link
Member

feature_0 v feature_0 being plotted instead of feature_0 v feature_1

Good catch, the logic should definitely be updated to at least by default start by plotting two different features instead of the same one when the plugin is loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants