matplotlib / matplotlib/matplotlib
Use `widgets.TextBox` as text readout for sliders
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 23.2k
- Forks
- 8.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 66
Description
### Problem
When using a slider there it is not easy to select a precise value when using the mouse. You can do this with `slider.set_val` but this is not always convenient.
### Proposed Solution
Use `widgets.TextBox` to display the slider readout. Then hook it up so that a user can enter values into the textbox and on submit the slider value will change.
To do this fully properly I think two additional things would need to happen:
1. Implement numeric only TextBox
2. if user clicks off of TextBox after typing then return the textbox to the current value of the slider.
### Additional context and prior art
Inspired by examples here: https://www.smashingmagazine.com/2017/07/designing-perfect-slider/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing slider and widgets.TextBox APIs, including slider.set_val, to understand how values and submissions are handled. Done means the slider displays its value in a TextBox, accepts submitted values, supports numeric-only input, and restores the current slider value when focus is lost after editing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100