OpenWaterAnalytics / EPyT

EPyT: An EPANET-Python Toolkit for Smart Water Network Simulations
https://epanet-python-toolkit-epyt.readthedocs.io
European Union Public License 1.2
39 stars 26 forks source link

EPyT overrides global matplotlib settings -- Why? #53

Closed andreArtelt closed 4 months ago

andreArtelt commented 4 months ago

EPyT overrides the global matplotlib settings as soon as an .inp file is opened -- i.e. lines 641 and following:

# Global plot settings
plt.rcParams["figure.figsize"] = [3, 2]
plt.rcParams['figure.dpi'] = 300
plt.rcParams['figure.constrained_layout.use'] = True
plt.rcParams['figure.max_open_warning'] = 30

Why is this the case? I could understand if this is done when plotting smth. with EPyT (although those global changes might be still considered as problematic) but just opening an .inp file should not manipulate the global matplotlib settings -- in particular because the user cannot undo it!

I suggest either removing the code completely or at least moving it to the plot function of EPyT.