Matplolib Figures won't display - TypeError: 'figure' is an unknown keyword argument

Symptom:

Creating plots/figures with matplotlib fails with and error similar to "TypeError: 'figure' is an unknown keyword argument"

 

Cause:

This problem is encountered due to a bug in the interaction between Canopy's backend preferences and the current provided version of the IPython kernel. The latest version of IPython changed the way it handles which backend should be used in Interactive mode if it is told to use the backend "qt" without specifying whether that should be Qt4 or Qt5. IPython now defaults to Qt5 and will try to load the Qt5Agg backend even if PyQt5 is not installed.

 

Solution:

The quick fix is to ensure that the backend settings under the Python Pane of the Canopy Preferences have the following settings: Pylab mode On and Backend set to "auto-select". This error should only occur when the backend setting is manually set to Qt4-interactive, all other settings should function correctly. 

Have more questions? Submit a request

Comments

Powered by Zendesk