FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

plotting with TkAgg backend becomes unresponsive after a certain qt5agg backend import command · Issue #8402 · matplotlib/matplotlib · GitHub

Repository navigation

plotting with TkAgg backend becomes unresponsive after a certain qt5agg backend import command #8402

Closed

Description

Bug report

I'm using a python library that happens to execute

from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas

When I plot using the TkAgg backend in interactive mode, the figure is unresponsive, though the data shows itself in that figure if I open a new figure.

Code for reproduction

import matplotlib.pyplot as plt
plt.ion()
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
plt.figure()
plt.plot([1], 'ko')     # plot a point

Actual outcome

The figure is unresponsive and blank, and the Mac spinning beachball symbol shows if I hover the cursor over it.

Expected outcome

The figure is plotted and responsive.

Matplotlib version

Matplotlib version 2.0.0.

python info:
Python 3.5.2 |Anaconda custom (x86_64)| (default, Jul 2 2016, 17:52:12)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin

Mac OS X, 10.11.6

Everything was installed using anaconda.

Activity

  1. tacaswell commented on Mar 30, 2017

    Member

    Are you using plain python or IPython?

    If the former I suspect that importing pyqt replaced the input hook from tk with the one from qt (for some more details see #4779 ). You may be able to track down how Tk sets up it's input hook and re-install it, but in general you should not expect multiple GUI frameworks to play nice in the same interactive session. The simplest solution is to just switch to using the Qt5 backend.

  2. js54434 commented on Mar 30, 2017

    Author

    I'm using plain python.

    Switching backends isn't really an option. Qt4 is apparently used with matplotlib when installed by anaconda on a mac, and using Qt5 and Qt4 together seems to be discouraged, so Qt5 probably isn't an option. As for other backends, I'm having separate issues with Qt4 and MacOSX.

  3. QuLogic commented on Mar 31, 2017

    Member

    Qt4 is just used by default because that's the setting the conda packagers gave it by default. You can use Qt5 pretty easily by updating conda install qt=5 and then modifying your matplotlibrc to set the Qt5Agg backend instead.

  4. js54434 commented on Mar 31, 2017

    Author

    Just trying "conda install qt=5" gave me a package dependency error, so I ended up reinstalling anaconda, which happened to update it to python 3.6. I can now use Qt5, and I don't seem to have issues with it.

  5. tacaswell commented on Mar 31, 2017

    Member

    Great, closing this as resolved.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL