mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-18 08:53:42 +00:00
Fix error in component plotting with only one component, Py
This commit is contained in:
parent
a6d68497f1
commit
4628bcd801
1 changed files with 2 additions and 0 deletions
|
|
@ -1302,6 +1302,8 @@ class Prophet(object):
|
||||||
|
|
||||||
fig, axes = plt.subplots(npanel, 1, facecolor='w',
|
fig, axes = plt.subplots(npanel, 1, facecolor='w',
|
||||||
figsize=(9, 3 * npanel))
|
figsize=(9, 3 * npanel))
|
||||||
|
if npanel == 1:
|
||||||
|
axes = [axes]
|
||||||
|
|
||||||
for ax, plot in zip(axes, components):
|
for ax, plot in zip(axes, components):
|
||||||
if plot == 'trend':
|
if plot == 'trend':
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue