You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not easy to figure out the differences between the Lasso Demo and the Lasso Selector Demo. There is some redundancy between them
The Lasso Demo explanation contains this off putting sentence:
This is currently a proof-of-concept implementation (though it is usable as is). There will be some refinement of the API.
Furthermore, despite both Lasso and LassoSelector being in widgets.py the Lasso Demo is under the Event Handling sections of the gallery - which I find confusing.
at which point I have no doubt that it was a true statement. However, the api does seem to have solidified in the intervening years. Also in this rooting around through history it seems that LassoSelector was added (#730) several years after the initial Lasso implementation, is it always to be preferred?
Unfortunately, widgets are not very actively maintained. Without looking into the details, it may well be Lasso is superseded by LassoSelector. At least the limiting note in the Lasso example and the fact that the younger LassoSelector is more in line with the other selectors would make it plausible that LassoSelector was intended as a replacement. Unfortunately #730 is not explicit about it. Ping @efiring who merged #730: Do you remember anything about this?
The difficult part is to decide what should be done. Once that's done it's possibly less work to directly do it than to write up what to do in a newcomer-friendly way. It's mostly getting the right wording in the right places.
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
I still have difficulty to understand the differences and would be happy to get rid of one. @ianhi can you explain why Lasso should be deprecated and whether LassoSelector is the right choice?
(After a cursory read I don't see why I wouldn't always prefer the latter)
I wish I had explained myself 😞 . I don't know why I said that. Bbut agree that going to just one would be good. I guess I preferred LassoSelector because there were bugs in Lasso at that time or simply because it was newer?
Activity
ianhi commentedon Jan 3, 2021
Turns out this comment was added 15 years ago:
https://github.com/matplotlib/matplotlib/blame/7a0d65666ee9e73736500eddd20d65acafb86a65/examples/event_handling/lasso_demo.py#L10
at which point I have no doubt that it was a true statement. However, the api does seem to have solidified in the intervening years. Also in this rooting around through history it seems that LassoSelector was added (#730) several years after the initial Lasso implementation, is it always to be preferred?
timhoffm commentedon Jan 4, 2021
Unfortunately,
widgetsare not very actively maintained. Without looking into the details, it may well beLassois superseded byLassoSelector. At least the limiting note in the Lasso example and the fact that the younger LassoSelector is more in line with the other selectors would make it plausible thatLassoSelectorwas intended as a replacement. Unfortunately #730 is not explicit about it. Ping @efiring who merged #730: Do you remember anything about this?ianhi commentedon Jan 4, 2021
Is this also a good first issue? Assuming my proposed changes are desireable some of them are low barrier to entry.
timhoffm commentedon Jan 4, 2021
The difficult part is to decide what should be done. Once that's done it's possibly less work to directly do it than to write up what to do in a newcomer-friendly way. It's mostly getting the right wording in the right places.
ianhi commentedon Feb 14, 2023
Looking at this again due to #25155 and I now believe that
Lassoshould be deprecated in favor ofLassoSelectorgithub-actions commentedon Apr 13, 2026
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
timhoffm commentedon Apr 15, 2026
I still have difficulty to understand the differences and would be happy to get rid of one. @ianhi can you explain why
Lassoshould be deprecated and whetherLassoSelectoris the right choice?ianhi commentedon Apr 15, 2026
I wish I had explained myself 😞 . I don't know why I said that. Bbut agree that going to just one would be good. I guess I preferred LassoSelector because there were bugs in Lasso at that time or simply because it was newer?
ianhi commentedon Apr 15, 2026
Ok actually I do see. If you read the docstrings the advantage of LassoSelector starts to emerge
Lasso:
Init with a starting point is pretty confusing
and the LassoSelector
consistency among selectors seems like a real positive
timhoffm commentedon Apr 22, 2026
Usage statistics are not too different:
Lasso: 478
LassoSelector: 757
While it's not much I also think it's not worth to force existing users to migrate. Therefore, we should just discourage
Lasso.