Skip to content
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

Implement throttle and debouncing #172

Open
ianhi opened this issue Feb 27, 2021 · 0 comments
Open

Implement throttle and debouncing #172

ianhi opened this issue Feb 27, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@ianhi
Copy link
Collaborator

ianhi commented Feb 27, 2021

Problem

It is nice to sometimes be able to the throttle or debounce the updates to plots. See discussion in jupyter-widgets/ipywidgets#663 for an example for using with matplotlib.

Proposed Solution

  1. Provide a method for setting ipywidgets sliders to continuous_update=False
  2. Take the throttle and debounce examples fromm https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Events.html#Debouncing

For the throttling and debouncing I'm not exactly sure of the api. I think the simplest implementation (adding the fewest kwargs) is to apply them via the controls object and have them apply to all sliders.

controls.debounce(True/False)
controls.throttle(True/False)

or perhaps allow specifying only certain parameters

controls.throttle(True/False, 'tau')
controls.throttle(True/False, ['tau', 'beta'])

but that second version is more of a hassle.

@ianhi ianhi added the enhancement New feature or request label Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant