0

WHY DOESN’T IT PLOT

Although I get the graph background, no data is plotted. Why?? import yfinance as yf import matplotlib.pyplot as plt import numpy_financial as nf import pandas as pd data = yf.Ticker("BTC-USD") print(data.info["description"]) price = data.history(period='2yr') pc = price['Close'].pct_change() a = (pc + 1).cumprod() a.plot() plt.savefig('plot.png') https://code.sololearn.com/cLAaJJ9ZM4F3/?ref=app

2nd Aug 2022, 6:36 PM
Alex
Alex - avatar
1 Réponse
+ 3
You can link your code like this: Go to Code section, click +, insert your code, save. Come back to this thread, click +, Insert Code, sort for My Code Bits, select your code. This way it is more readable and others can test your code.
2nd Aug 2022, 7:09 PM
Lisa
Lisa - avatar