0

Here is the code below.

plt.figure(figsize=[15,7])
sm.tsa.seasonal_decompose(bitcoin_month.Weighted_Price).plot()
print("Dickey–Fuller test: p=%f" % sm.tsa.stattools.adfuller(bitcoin_month.Weighted_Price)[1])
plt.show()

When I release it I get the following output.

enter image description here

Every time I change the figsize the size does not change.

Please assist.

Marchewek
  • 211
  • 1
  • 2
  • 4
  • you need to create an Axes object and pass it to `.plot()` – Paul H Jan 26 '21 at 21:04
  • Can you say something more? Where exactly? – Marchewek Jan 26 '21 at 21:16
  • The plot function of [statsmodels/tsa/seasonal](https://www.statsmodels.org/stable/_modules/statsmodels/tsa/seasonal.html#DecomposeResult) creates its own new figure and axes. You can change them with `fig = plt.gcf()` and `fig.set_size_inches(15, 7)` after the call to `... .plot()`. See [How do you change the size of figures drawn with matplotlib?](https://stackoverflow.com/questions/332289/how-do-you-change-the-size-of-figures-drawn-with-matplotlib). Another option is `plt.rcParams["figure.figsize"] = (15,7)` before calling `...plot()`. – JohanC Jan 26 '21 at 21:30

0 Answers0