Skip to content

Commit

Permalink
Fix deprecated tight layout matplotlib (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannikschaelte authored Oct 12, 2022
1 parent 4f4ab92 commit 7455e03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions petab/visualize/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 7455e03

Please sign in to comment.