Skip to content

Duplicated figures on M2L2V4.ipynb #10

@pcrespoo

Description

@pcrespoo

There's an issue with this code, where the matplotlib figures are duplicating when executing the code.

After some time investigating this issue, it's necessary to close the figures after plotting them, otherwise matplotlib keeps referencing a global state variable, causing the figures duplication.

How to fix

After each st.pyplot(fig), run plt.close(fig)

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