In my opinion, there are two solutions.
1.I downloaded the data from yfinance and specifically reset the indexes to turn the 'Datetime' indexes into a column. And I draw a scatter, specifying a list of indexes. Possible that you have these indexes and have buy?
import matplotlib.pyplot as plt
import yfinance as yf
df = yf.download(tickers='AAPL', period="3d", interval="15m")
df = df.reset_index()
plt.scatter(df['Datetime'].values[[7, 55, 70]], df['Close'].values[[7, 55, 70]], color='magenta')
plt.plot(df['Datetime'].values, df['Close'].values)
plt.legend(['stock', 'point'])
plt.show()
2.And also try to specify indexes in plt.plot, when drawing line, something like this:
plt.plot(df['C'].index, df['C'])
Perhaps because of this, such a picture turns out that the scatter appears somewhere at the beginning of the indexes.
df). I suspect that is where your date/time parsing is happening withpandas.plt.scatter(df['Date'], df["C"], marker = "^", color = "green", label = "Close Price");?