Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matplotlib backend in Mac can't be changed when using PySide #1987

Closed
spyder-bot opened this issue Feb 17, 2015 · 8 comments
Closed

Matplotlib backend in Mac can't be changed when using PySide #1987

spyder-bot opened this issue Feb 17, 2015 · 8 comments

Comments

@spyder-bot
Copy link
Collaborator

From breed...@gmail.com on 2014-09-26T22:33:53Z

Spyder Version: 2.3.1
Python Version: 2.7.6
Qt Version : 4.8.5, PySide 1.2.2 on Darwin
pyflakes >=0.5.0: 0.8.1 (OK)
pep8 >=0.6 : None (NOK)
IPython >=0.13 : 2.2.0 (OK)
pygments >=1.6 : 1.6 (OK)
pandas >=0.13.1 : 0.14.1 (OK)
sphinx >=0.6.6 : 1.2.3 (OK)
psutil >=0.3 : 2.1.1 (OK)
rope >=0.9.2 : 0.10.2 (OK)
matplotlib >=1.0: 1.4.0 (OK)
sympy >=0.7.0 : 0.7.5 (OK)
pylint >=0.25 : None (NOK)

What steps will reproduce the problem?

  1. Install Spyder via pip, with Enthought Canopy Python
  2. Go Preferences -> Console -> external modules
  3. Select "PyQt4" for Qt-Python bindings library selection
  4. Close the Preferences pane
  5. Restart Spyder
  6. Go Preferences -> Console -> external modules

What is the expected output? What do you see instead?

Expected output is "PyQt4" Qt-Python bindings library selection. I see "PySide" instead.

Please provide any additional information below

. I have specified "Qt4Agg" for the matplotlib backend in Preferences -> Console -> external modules. If I do not do step #6, I can restart Spyder as many times as I want and then run matplotlib.get_backend(), and I get "Qt4Agg". If I do step #6 and restart Spyder, then matplotlib.get_backend() gives "MacOSX". Thus, I believe opening the preferences pane causes Spyder to switch from "PyQt4" to "PySide"

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1987

@spyder-bot
Copy link
Collaborator Author

From breed...@gmail.com on 2014-10-14T18:59:52Z

This seems like low hanging fruit to fix. Can anyone reproduce the issue?

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-11-18T15:32:36Z

Status: Accepted
Labels: MS-v2.3.3 OpSys-OSX Cat-Console

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-01-08T15:14:59Z

Labels: -MS-v2.3.3 MS-v2.4

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-02-08T18:43:21Z

Summary: Matplotlib backend in Mac can't be changed whe using PySide (was: Qt-Python binding library selection gets reset when preference pane is opened)
Labels: -MS-v2.4 MS-v2.3.3

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-02-08T19:21:23Z

About the Qt bindings: those are set automatically according to the ones found in your external interpreter.

Since Canopy doesn't come with PyQt4 but only with PySide, that's why even if you change them, they are set back to the only available option.

Summary: Matplotlib backend in Mac can't be changed when using PySide (was: Matplotlib backend in Mac can't be changed whe using PySide)

@spyder-bot
Copy link
Collaborator Author

From breed...@gmail.com on 2015-02-08T20:23:42Z

Ok. That makes sense. I suppose it would be better if PyQt4 was grayed out if it is unavailable, but whatever. To get PyQt4 from Enthought, I have to have the non-free version of Canopy. I don't really feel like building it from source right now, so that means I am stuck with PySide.

The confusing part is, everything works fine if I always remember to select "PyQt4" for Qt-Python bindings library selection before I close the preference pane. I can restart spyder repeatedly, and matplotlib.get_backend() returns 'Qt4Agg'. If I forget to select "PyQt4" for the Qt-Python bindings library, then matplotlib.get_backend() returns 'MacOSX'. So it seems like the backend can be changed when using PySide.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-02-08T21:30:09Z

This issue was closed by revision 764249a1443a .

Status: Fixed

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-02-12T08:30:57Z

@-breedlun: Forcing the MacOS backend when using PySide was an ugly hack of mine, sorry for that... It'll be fixed on 2.3.3 :-)

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

No branches or pull requests

1 participant