Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FeaturesLineWidget#200

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
zoccoler wants to merge10 commits intomatplotlib:main
base:main
Choose a base branch
Loading
fromzoccoler:line_and_featuresline_widgets

Conversation

zoccoler
Copy link
Contributor

Hi@dstansby ,

As suggested in#184 , I am transferring the code here without theLineWidget.

This PR brings aBaseLineWidget and aFeaturesLineWidget to napari-matplotlib, where theFeaturesLineWidget has anobject-id field capable of grouping objects before plotting, thus displaying individual line plots for each object.

Best,
Marcelo

zoccolerand others added9 commitsOctober 28, 2022 17:06
Co-authored-by: David Stansby <dstansby@gmail.com>
- 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)
Copy link
Member

@dstansbydstansby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Just having a play around with this, and I'm confused by what the "object-id" selector is for? Why are there not just two selectors that select what is being plotted on the x/y axes?

And following on from that, how is this different from theFeaturesScatterWidget? Could we add the functionality desired by just doing exactly the same asFeaturesScatterWidget, but joining the scatter points with a line?

@@ -210,6 +210,9 @@ def current_z(self) -> int:
Current z-step of the napari viewer.
"""
return self.viewer.dims.current_step[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
return self.viewer.dims.current_step[0]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I assume the lineself.viewer.dims.current_step[-3] is a bug fix below for datasets that have >= 4 dimensions?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We can drop it for now since it does no affect this PR anymore. It had to do with other dimensions, yes

@zoccoler
Copy link
ContributorAuthor

Just having a play around with this, and I'm confused by what the "object-id" selector is for? Why are there not just two selectors that select what is being plotted on the x/y axes?

Good question. So theobject_id is the factor that groups elements from the table using the.groupby from pandas. This allows individual lines for each label with different colors. Typically this is just a column named 'label' in the table containing the label numbers, but as this can vary from different people and I cannot anticipate what it will be, so I chose to add it in the interface and let the user decide.

By the way, I noticed I was still calling 'label' in other places, so I renamed them toobject_id now to make it more general.

And following on from that, how is this different from theFeaturesScatterWidget? Could we add the functionality desired by just doing exactly the same asFeaturesScatterWidget, but joining the scatter points with a line?

Hmm I am not sure. Over there, the.scatter is being used, which returns aPathCollection right? I am interested in having access toLine2D objects. That also why I was adding a_lines list as a property of the class before, to store currentLine2D artists in the plot, because I thought it would be faster to update existing lines data with.set_xdata and.set_ydata than redraw all the lines.

@zoccoler
Copy link
ContributorAuthor

Hi@dstansby ,

Did you have some time to consider this feature?

Thanks for your time on reviewing this!

@zoccoler
Copy link
ContributorAuthor

This would close#60

@dstansbydstansby added the New featureNew feature or request labelJan 7, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@dstansbydstansbydstansby left review comments

Assignees
No one assigned
Labels
New featureNew feature or request
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@zoccoler@dstansby

[8]ページ先頭

©2009-2025 Movatter.jp