Fix error in component plotting with only one component, Py

This commit is contained in:
Ben Letham 2018-02-01 15:40:38 -08:00
parent a6d68497f1
commit 4628bcd801

View file

@ -1302,6 +1302,8 @@ class Prophet(object):
fig, axes = plt.subplots(npanel, 1, facecolor='w',
figsize=(9, 3 * npanel))
if npanel == 1:
axes = [axes]
for ax, plot in zip(axes, components):
if plot == 'trend':