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


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



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.



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. 

Note, the auto backend is only available in Canopy version 2.1.6 and newer.

Have more questions? Submit a request


  • Avatar
    Hal Gurgenci

    The "Pylab backend" does not have a "auto select" choice in Version: (64 bit)

  • Avatar
    Maxwell Grady

    Hello Hal,
    Thanks for pointing that out; I'll update our solution section.
    The current version of Canopy is 2.1.9, Canopy 2.1.3 was released over a year ago. I recommend updating to the latest version

Powered by Zendesk