-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
I have been having major issues with matplotlib and the various IPython environments (the terminal shell, qtconsole, and notebook). So, I decided to methodically go through different combinations of ipython and jupyter qtconsole options. Here are the maddeningly and fascinatingly inconsistent results, using either command-line arguments, magic commands after IPython loads, or some combination of both. I am using the Anaconda library and have re-installed and updated all relevant packages (qt, qtconsole, pyqt, matplotlib, etc.).
FOR IPYTHON TERMINAL:
GUI SPEC:
--gui=qt, %matplotlib qt: after trying to declare figure, get "missing 1 required positional argument: 'figure'" (....what?)
--gui=qt, --matplotlib=qt: get "no module named PyQt4"
--gui=qt, %matplotlib qt5: success; different window format than osx, with save dialogue offering filetype choice
--gui=qt, --matplotlib=qt5: success; same as above
--gui=qt, %matplotlib osx: success; window pops up as separate application
--gui=qt, --matplotlib=osx: QApplication window NEVER STARTS; fig appears as popup/part of terminal application, does not have its own "window"
NO GUI SPEC:
--matplotlib=qt5 OR %matplotlib qt5: success
--matplotlib=qt OR%matplotlib qt: get "no module named PyQt4"
--matplotlib=osx OR %matplotlib osx: QApplication window NEVER STARTS; fig appears as temporary popup
FOR JUPYTER QTCONSOLE using jupyter qtconsole -- (args follow)
GUI SPEC:
--gui=qt, %matplotlib qt5: get "RuntimeError: Cannot activate multiple GUI eventloops"
--gui=qt, --matplotlib=qt5: works, creates QApplication window for figures (seriously... WHAT? then why the hell doesn't %matplotlib qt5 work?)
--gui=qt, --matplotlib=inline OR %matplotlib inline: after trying to use plt.show(), get "matplotlib is currently using a non-GUI backend,"
--gui=qt, %matplotlib osx: get "RuntimeError: Cannot activate multiple GUI eventloops"
--gui=qt, --matplotlib=osx: works, but NO QApplication window; just a window-less popup
NO GUI SPEC:
--matplotlib=qt5 OR %matplotlib qt5: same as above, works
--matplotlib=osx OR %matplotlib osx: same as above, NO QApplication
--matplotlib=inline OR %matplotlib inline: after trying to use plt.show(), get "matplotlib is currently using a non-GUI backend,"
--matplotlib=qt: get "Eventloop or matplotlib integration failed. Is matplotlib installed?"
%matplotlib qt: get "no module named PyQt4"
FOR JUPYTER NOTEBOOK (no command-line options for notebook server, must specify in notebook cells)
%matplotlib inline: after trying to use plt.show(), get "matplotlib is currently using a non- GUI backend,"
%matplotlib notebook: works fine