Skip to content

New configure_subplots behaves badly on TkAgg backend #18299

@richardsheridan

Description

@richardsheridan

Bug report

Bug summary

After #16818, with the TkAgg backend, configure subplots window can't be closed and the sliders do not respond to input. The window close issue is straightforward to understand: the button response calls Gcf.destroy but the figure is intentionally not registered, so the FigureManagerTk.destory is never called. I suspect (but have not confirmed) that the slider events are being lost due to the new figure manager making a new tkinter.Tk instance here. [EDIT: NOPE, see comment]

CC @anntzer

Code for reproduction

import matplotlib
import matplotlib.pyplot as plt

matplotlib.use("TkAgg")
plt.plot([1,2,3],[1,2,5])
#  if not interactive
plt.show()
# click Configure Subplots

Actual outcome

interactive Tk window but sliders don't work and close window button is not responsive

Expected outcome

previous behavior

Matplotlib version

  • Operating system: Win10
  • Matplotlib version: master
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg
  • Python version: 3.8.5
  • Jupyter version (if applicable):
  • Other libraries:

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUI: tkRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy