Skip to content

Cannot import pyplot. NameError: 'FigureManagerWebAgg' is not defined #9380

@cknd

Description

@cknd

Bug report

When using the webagg backend on 2.1.0, importing pyplot fails with a NameError.

Code for reproduction

import matplotlib
matplotlib.use('WebAgg')
from matplotlib import pyplot

Actual outcome

I get a name error. traceback excerpt:

.../python3.6/site-packages/matplotlib/backends/__init__.py in pylab_setup(name)
     58     # imports. 0 means only perform absolute imports.
     59     backend_mod = __import__(backend_name, globals(), locals(),
---> 60                              [backend_name], 0)
     61 
     62     # Things we pull in from all backends

.../python3.6/site-packages/matplotlib/backends/backend_webagg.py in <module>()
    325 
    326 @_Backend.export
--> 327 class _BackendWebAgg(_Backend):
    328     FigureCanvas = FigureCanvasWebAgg
    329     FigureManager = FigureManagerWebAgg

.../python3.6/site-packages/matplotlib/backends/backend_webagg.py in _BackendWebAgg()
    327 class _BackendWebAgg(_Backend):
    328     FigureCanvas = FigureCanvasWebAgg
--> 329     FigureManager = FigureManagerWebAgg
    330 
    331     @staticmethod

NameError: name 'FigureManagerWebAgg' is not defined

Matplotlib version

  • Operating system: Mac OS 10.12.6
  • Matplotlib version: 2.1.0
  • Matplotlib backend (print(matplotlib.get_backend())): WebAgg
  • Python version: Python 3.6.2
  • Jupyter version (if applicable): -
  • Other libraries:

I installed matplotlib via pip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUI: webaggRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions