Skip to content

pcolormesh freezes window when zooming/panning #22253

Closed

Description

@cycomanic

In matplotlib 3.5.1 on Linux (arch and opensuse) pcolormesh is causing some extreme slowdowns. When I try to zoom or pan inside the window, reactions from the mouse are very slow, such that the drawn zoom indicator is >1s delayed and the window/notebook freezes.

The extend varies somewhat by backend. Using the %matplotlib notebook backend in jupyter notebook, freezes as soon as one tries to zoom, and the kernel has to be restarted. Using Qt5Agg with ipython from the terminal, also freezes immediately. With the Gtk3Agg backend the window does not fully freeze but the zoom indicator etc. are extremely laggy.

I checked with pcolor and pcolorfast as well as imshow and all work fine.

Test case:

import matplotlib.pyplot as plt
import numpy as np
  
x = np.linspace(-5,5,512)
X,Y = np.meshgrid(x,x)
g = np.exp(-(X**2+Y**2)/2)

plt.figure()
ax = plt.subplot(111)
plt.pcolormesh(X,Y,g)
plt.show()

Run and select the zoom button in the opened window. If using Qt5Agg the window (and terminal) freezes, CTRL-C only works with very long delay.

Activity

  1. dstansby commented on Jan 17, 2022

    @dstansby
    Member

    I suspect this is a duplicate of #21917

  2. cycomanic commented on Jan 18, 2022

    @cycomanic
    Author

    @dstansby you are correct that looks like a duplicate, sorry for not catching that. Maybe the title of #21917 should be changed (in case someone else is searching for it), because I didn't think it was related to my bug, and I could not read every bug.

    Closing because duplicate of #21917

  3. dstansby commented on Jan 18, 2022

    @dstansby
    Member

    Thanks - good suggestion, I have updated the title of the other issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions