Skip to content

BUG: Interactive mode slow #16294

@larsoner

Description

@larsoner

Based on git bisect it looks like #16028 caused a regression with interactive mode in Python 3.8, Qt5Agg backend (PyQt5=5.13.2), Linux x86_64 (at least; this is my system). The previous behavior (e.g., in 98aceb1) is that just doing:

import matplotlib.pyplot as plt
plt.ion()
fig, ax = plt.subplots()

would pop up a plot, and:

  • Typing in the terminal worked fine
  • Hitting ctrl-C (and then enter) had normal terminal behavior:
    >>>
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    KeyboardInterrupt
    >>> 
    

But in e6ffa5d, I get:

  • Typing is very slow in the terminal (worsens with plot complexity)
  • Hitting ctrl-C kills the terminal:
    >>> Traceback (most recent call last):
      File "/home/larsoner/python/matplotlib/lib/matplotlib/backends/backend_qt5.py", line 507, in _draw_idle
        self.draw()
    ...
      File "/home/larsoner/python/matplotlib/lib/matplotlib/ticker.py", line 2081, in __call__
        return self.tick_values(vmin, vmax)
      File "/home/larsoner/python/matplotlib/lib/matplotlib/ticker.py", line 2089, in tick_values
        locs = self._raw_ticks(vmin, vmax)
      File "/home/larsoner/python/matplotlib/lib/matplotlib/ticker.py", line 2045, in _raw_ticks
        istep = np.nonzero(steps >= raw_step)[0][0]
    KeyboardInterrupt
    Aborted
    

If this description is not clear I could record some screen-cast GIFs or something.

Metadata

Metadata

Assignees

Labels

No labels
No labels

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