oopnet / oopnet

An easy-to-use object-oriented Python package for water distribution system modelling based on EPANET.
https://oopnet.readthedocs.io
MIT License
21 stars 8 forks source link

plot() method show two subplots #38

Closed jermaine1ronquillo closed 2 years ago

jermaine1ronquillo commented 2 years ago

Checks

Bug Description

Using the plot() method return two subplots.

Steps to Reproduce

network.plot() network2.plot(nodes=p.iloc[1], links=f.iloc[1], fignum=0, robust=True)

Expected Behavior

If this is the default of plot(), how will the second plot be removed?

Screenshots

image image

Additional context

tiuri101 commented 2 years ago

Thank you for the issue!

This is not a bug in OOPNET but a general "issue" with matplotlib plots in jupyter notebooks, see for instance this statsmodels issue or this stack overflow post. The latter one also shows several options how to deal with this.

Closing the issue since there is nothing to fix.