Skip to content

Wait cursor may cause Tk to print _get_renderer.Done backtrace #18186

Closed
@QuLogic

Description

@QuLogic

Bug report

Bug summary

I was looking at #11769, and apparently Gouraud shading was slow enough to trigger the wait cursor on the third figure. This printed out a backtrace, though the figures seems to be saved just fine.

Code for reproduction

See #11769.

Actual outcome

../mpl-tests/issue11769.py:23: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3.  Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading'].  This will become an error two minor releases later.
  plt.pcolormesh(x,y,map2,cmap='viridis',vmin=np.nanmin(map2),vmax=np.nanmax(map2))

Exception in Tkinter callback
Traceback (most recent call last):
  File "/var/container/conda/envs/mpl37/lib/python3.7/tkinter/__init__.py", line 1705, in __call__
    return self.func(*args)
  File "/var/container/conda/envs/mpl37/lib/python3.7/tkinter/__init__.py", line 749, in callit
    func(*args)
  File ".../matplotlib/lib/matplotlib/backends/_backend_tk.py", line 247, in idle_draw
    self.draw()
  File ".../matplotlib/lib/matplotlib/backends/backend_tkagg.py", line 9, in draw
    super().draw()
  File ".../matplotlib/lib/matplotlib/backends/backend_agg.py", line 409, in draw
    self.figure.draw(self.renderer)
  File ".../matplotlib/lib/matplotlib/backend_bases.py", line 1546, in _draw
    def _draw(renderer): raise Done(renderer)
matplotlib.backend_bases._get_renderer.<locals>.Done: <matplotlib.backends.backend_agg.RendererAgg object at 0x7f45c8946290>

Expected outcome

No backtrace printed.

Matplotlib version

  • Operating system: Fedora 31
  • Matplotlib version: master 52761de
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg
  • Python version: 3.7.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions