Fix "UserWarning" in model.plot_components (#1732)

See the issue https://github.com/facebook/prophet/issues/1721
This commit is contained in:
Aziz Alto 2020-11-10 14:21:23 -05:00 committed by GitHub
parent ad3832bb19
commit ee592451f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -429,6 +429,7 @@ def plot_seasonality(m, name, ax=None, uncertainty=True, figsize=(10, 6)):
def set_y_as_percent(ax):
yticks = 100 * ax.get_yticks()
yticklabels = ['{0:.4g}%'.format(y) for y in yticks]
ax.set_yticks(ax.get_yticks().tolist())
ax.set_yticklabels(yticklabels)
return ax