Skip to content

Update Axes showcase in "Embedding in Tk" example #20218

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

Merged
merged 8 commits into from
May 19, 2021

Conversation

kopytjuk
Copy link
Contributor

@kopytjuk kopytjuk commented May 13, 2021

PR Summary

From the example in https://matplotlib.org/stable/gallery/user_interfaces/embedding_in_tk_sgskip.html it is not clear how to update plots in interactive user interfaces (see #20159). This PR extends the example with an update button which shows how to update the plot in the FigureCanvasTkAgg.

image

PR Checklist

  • [ N/A] Has pytest style unit tests (and pytest passes).
  • [ N/A] Is Flake 8 compliant (run flake8 on changed files to check).
  • [N/A] New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@kopytjuk kopytjuk changed the title Update axes in "Embedding in Tk" example Update Axes showcase in "Embedding in Tk" example May 13, 2021
@jklymak jklymak added this to the v3.5.0 milestone May 16, 2021
@jklymak jklymak marked this pull request as draft May 16, 2021 19:41
@jklymak jklymak marked this pull request as ready for review May 18, 2021 17:15
kopytjuk and others added 2 commits May 19, 2021 07:41
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
@QuLogic QuLogic merged commit 818133a into matplotlib:master May 19, 2021
jklymak pushed a commit to jklymak/matplotlib that referenced this pull request Jun 13, 2021
* Update plot in tk-embedding example

* Flake 8 fix

* Change from button to slider

* Fix linting.

* Update data via set_data().

* Labels to physical units.

* Update examples/user_interfaces/embedding_in_tk_sgskip.py

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

* Update examples/user_interfaces/embedding_in_tk_sgskip.py

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants