-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Figure select function selector #2844
Conversation
Any function that calls BaseFigure._selector_matches can use a function as the selector. This includes the "Figure.for_each_*" functions, the "Figure.update_*" functions, and the "Figure.select_*" functions. See test_selector_matches.py for the behaviour of the selector argument.
Superseded by #2844 I imagine? Can close? |
I meant: supersedes #2836 therefore we can close that one! |
else: | ||
raise TypeError( | ||
"selector must be dict or a function " | ||
"accepting a trace returning a boolean." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is now more than just "a trace" right? maybe "a graph object" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, copy paste error! good catch 👍
Nicely done! 💃 when you address my comment about |
Now selector can accept any graph object
Looks great, please merge! |
Closes #2629 and more.
Any function calling
BaseFigure._selector_matches
can now pass a function for theselector
argument. This function is called on each object and if it returns True, then that object is included in the selection.