How do you replace set_tight_layout with set_layout_engine?

71 views Asked by At

When I call fig.set_tight_layout(True) on a Matplotlib figure, I receive this deprecation warning:

The set_tight_layout function will be deprecated in a future version. Use set_layout_engine instead.

How do I call set_layout_engine so as to match the current behavior as closely as possible?

Environment: 

OS: Mac
Python: 3.10.6
matplotlib: 3.7.2
1

There are 1 answers

0
Cem Koçak On BEST ANSWER