Skip to content

Importing cocopp disables matplotlib plots #54

@oskargirardin

Description

@oskargirardin

In a jupyter notebook, after importing cocopp, matplotlib-plots cannot be shown anymore. We get the following error:

>>> import cocopp
>>> import matplotlib.pyplot as plt
>>> plt.plot([1,2])
>>> plt.show()
UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown plt.show()

A quick fix is to run %matplotlib inline before plotting as such:

>>> import cocopp
>>> import matplotlib.pyplot as plt
>>> %matplotlib inline
>>> plt.plot([1,2])
>>> plt.show()

I am using versions cocopp == 2.7.3 and matplotilib == 3.10.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions