I am trying to plot 1-minute data for a stock over the course of 5 days, when I try to plot I get straight lines between each day, how can I remove them? I have attached an image of the plot. Thanks so much in advance for the help. Here is my code:
import yfinance as yf
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
tickers = 'SPY'
data1 = yf.download(tickers, period="1wk", interval = '1m')
data = data1['Adj Close'].dropna()
data.plot()