matplotlib / matplotlib/matplotlib

Clarify Lasso[Selector] demos

Open
#19,221 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation topic: widgets/UI
Dominant language
Python
Stars
23.2k
Forks
8.5k
Avg merge
1d 6h
Merged PRs (30d)
66

Description

### Problem
It is not easy to figure out the differences between the [Lasso Demo](https://matplotlib.org/devdocs/gallery/event_handling/lasso_demo.html#sphx-glr-gallery-event-handling-lasso-demo-py) and the [Lasso Selector Demo](https://matplotlib.org/devdocs/gallery/widgets/lasso_selector_demo_sgskip.html#sphx-glr-gallery-widgets-lasso-selector-demo-sgskip-py). 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.

https://matplotlib.org/3.3.2/gallery/widgets/lasso_selector_demo_sgskip.html and It not eas

### Suggested Improvements

1. Move `Lasso Demo` under the widgets examples
2. remove the sentence about proof of concept implementation from Lasso Demo.
3. Add a recommendation (and link to demo) to use `LassoSelector` for selecting points to the explanatory paragraph in `Lasso Demo`
- Both examples should probably cross reference eachother actually
4. Create an example showcasing the difference between `Lasso` and `LassoSelector` (After a cursory read I don't see why I wouldn't always prefer the latter)

**Matplotlib version**
* Matplotlib documentation version: devdocs/3.3.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked gallery examples for Lasso and LassoSelector, along with widgets.py, to compare their purpose and placement. Move the Lasso demo under widgets, remove the outdated proof-of-concept wording, and add cross-references or a comparison example explaining when to use each. Confirm both demos build and render correctly in the documentation gallery.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.