Skip to content

Commit feaf0d3

Browse files
Fix deprecated tight layout matplotlib
1 parent 4f4ab92 commit feaf0d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

petab/visualize/plotter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def generate_figure(
362362

363363
fig, axes = plt.subplots(num_row, num_col, squeeze=False,
364364
figsize=self.figure.size)
365-
fig.set_tight_layout(True)
365+
fig.set_layout_engine("tight")
366366

367367
for ax in axes.flat[self.figure.num_subplots:]:
368368
ax.remove()
@@ -373,7 +373,7 @@ def generate_figure(
373373
for subplot in self.figure.subplots:
374374
if subplot_dir is not None:
375375
fig, ax = plt.subplots(figsize=self.figure.size)
376-
fig.set_tight_layout(True)
376+
fig.set_layout_engine("tight")
377377
else:
378378
ax = axes[subplot.plotId]
379379

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def absolute_links(txt):
5858
packages=find_packages(exclude=['doc*', 'test*']),
5959
install_requires=['numpy>=1.15.1',
6060
'pandas>=1.2.0',
61-
'matplotlib>=3.5.0',
61+
'matplotlib>=3.6.0',
6262
'python-libsbml>=5.17.0',
6363
'sympy',
6464
'colorama',

0 commit comments

Comments
 (0)