Skip to content

Line plot widget with features #184

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

Conversation

zoccoler
Copy link
Contributor

@zoccoler zoccoler commented Jul 3, 2023

Hi @dstansby ,

As discussed in a previous #63 , I have updated and re-factored the previous code to add a line widget! 📈 🚀

  • The LineBaseWidget just uses plot, similar to the SliceWidget, but without spinboxes. It is used as base by the following classes.
  • The LineWidget uses the Shapes layer to plot intensities from a selected Image layer. So far, it only works with the shape line. I had to make a small change in base because of this line. I am using the bezier_curve from scikit-image to get pixel coordinates. There is no interpolation in this current implementation.
  • The FeaturesLineWidget is similar to the FeaturesScatterWidget, but it has a third dropdown to group plots by a 'label' column.

I provided 3 minimal examples and gifs to show how it looks like. I believe the FeaturesLineWidget gets interesting, for example, when one has features over time. It also works for single time points, although I think a scatter plot would make more sense then.

I am particularly interested in using the LineWidget and the FeaturesLineWidget in other plugins I am working on.

Lastly, I tried to make them minimal and generalizable, but I have some difficulties setting what is minimal 😅 . I think I can count on your experience to help me there.

Best,
Marcelo

zoccoler and others added 7 commits October 28, 2022 17:06
Co-authored-by: David Stansby <[email protected]>
- make LineBaseWidget
- make LineWidget for plotting intensities under shapes layer
- make FeaturesLineWidget for plotting features from labels layer (grouped by a label column matching labels in layer)
@dstansby
Copy link
Member

Thanks for the clear description, examples and gifs! I like both these a lot, and the code looks good too 👍 . I think I will need to do more thinking about the LineWidget, so would you be happy to put the base widget at the FeaturesLineWidget in a separate PR? I think I could review/merge/release that fairly quickly, without discussions about the LineWidget holding it up.

@zoccoler zoccoler mentioned this pull request Jul 29, 2023
@zoccoler
Copy link
Contributor Author

Alright, I just opened #200 for that, thanks!

@zoccoler
Copy link
Contributor Author

Closing this, updates can be found in #200

@zoccoler zoccoler closed this Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants