mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-16 08:38:30 +00:00
Check for tight_layout before applying it in plot function (#2504)
This commit is contained in:
parent
53b9b1a6be
commit
279d8d6a30
1 changed files with 3 additions and 1 deletions
|
|
@ -63,6 +63,7 @@ def plot(
|
|||
-------
|
||||
A matplotlib figure.
|
||||
"""
|
||||
user_provided_ax = False if ax is None else True
|
||||
if ax is None:
|
||||
fig = plt.figure(facecolor='w', figsize=figsize)
|
||||
ax = fig.add_subplot(111)
|
||||
|
|
@ -89,7 +90,8 @@ def plot(
|
|||
ax.set_ylabel(ylabel)
|
||||
if include_legend:
|
||||
ax.legend()
|
||||
fig.tight_layout()
|
||||
if not user_provided_ax:
|
||||
fig.tight_layout()
|
||||
return fig
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue