From 7455e031e3d1047d9461abee0c5fa4670611a0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannik=20Sch=C3=A4lte?= <31767307+yannikschaelte@users.noreply.github.com> Date: Wed, 12 Oct 2022 13:28:07 +0100 Subject: [PATCH] Fix deprecated tight layout matplotlib (#180) --- petab/visualize/plotter.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/petab/visualize/plotter.py b/petab/visualize/plotter.py index 7fe5012f..1e3807f4 100644 --- a/petab/visualize/plotter.py +++ b/petab/visualize/plotter.py @@ -362,7 +362,7 @@ def generate_figure( fig, axes = plt.subplots(num_row, num_col, squeeze=False, figsize=self.figure.size) - fig.set_tight_layout(True) + fig.set_layout_engine("tight") for ax in axes.flat[self.figure.num_subplots:]: ax.remove() @@ -373,7 +373,7 @@ def generate_figure( for subplot in self.figure.subplots: if subplot_dir is not None: fig, ax = plt.subplots(figsize=self.figure.size) - fig.set_tight_layout(True) + fig.set_layout_engine("tight") else: ax = axes[subplot.plotId] diff --git a/setup.py b/setup.py index bda45b16..683bf366 100644 --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ def absolute_links(txt): packages=find_packages(exclude=['doc*', 'test*']), install_requires=['numpy>=1.15.1', 'pandas>=1.2.0', - 'matplotlib>=3.5.0', + 'matplotlib>=3.6.0', 'python-libsbml>=5.17.0', 'sympy', 'colorama',