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
1 Answer
+ 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.