pandas - Python StatsModels Time Series Decomposition Duplicate Plot -
i using mixture of pandas , statsmodels plot time series decomposition. followed this answer when call plot()
seems plotting duplicate.
my dataframe
looks like
my index looks like
but when plot decomposition this
strangely, if plot element of decomposition, duplication not occur
assign result of res.plot()
something, e.g. fig = res.plot()
. result of method matplotlib.figure
. duplicate it's _repr_html_
, notebook renders since it's last item in cell. can try with
fig, ax = plt.subplots() ax.plot([1, 2], [1, 2]) fig
the second method returns matplotlib axes
, doesn't have _repr_html
see text above figure.
Comments
Post a Comment