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

(DRAFT) feat: SpanSelectorN implementation for Issue #28484#30720

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

Draft
mattgebert wants to merge3 commits intomatplotlib:main
base:main
Choose a base branch
Loading
frommattgebert:NSpanSelector

Conversation

@mattgebert
Copy link

PR summary

This PR is to implement an SpanSelectorN, an implementation of multiples of theSpanSelector widget, which is very useful for spectroscopy and other sorts of normalisation processes used in data analysis. This is related to andcloses#28484.

This PR is currently in a draft state, as progress will be added to the implementation (testing, features, documentation etc).
A few bugs in current implementation, I have a fix somewhere on another drive will add soon.

MWE

import matplotlib.pyplot as pltfrom matplotlib.widgets import SpanSelectorNfig, ax = plt.subplots()ax.plot([1, 2, 3], [10, 50, 100])N=3def onSelectorGenerator(i):    def onselect(vmin, vmax):        print(f"Span {i}:\t", vmin, vmax)    return onselectfns = [onSelectorGenerator(i) for i in range(N)]span = SpanSelectorN(N, ax, fns, 'horizontal', useblit=True, interactive=True, drag_from_anywhere = True)plt.show()# Get all current positions....print(span.extends)

PR checklist

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[ENH]: Add multiple span selector

1 participant

@mattgebert

[8]ページ先頭

©2009-2025 Movatter.jp