I'm trying to plot the predicted vs actual of a stock using Seaborn's scatterplot, I can plot the scatter fine, but what I want to do is also visualise where today's data is, in a different colour.
I tried doing:
current_x = df['Prediction'].iloc[-1]
current_y = df['Actual'].iloc[-1]
and plotting that but got this error message :
ValueError: If using all scalar values, you must pass an index.
Any help would be really appreciated cheers.
EDIT:
So I have a df
containing a df['Prediction']
and df['Actual']
columns of price data, the code to print the scatterplot I have used so far is very imple:
sns.scatterplot(x='Predicted', y='Actual, data=data)
What I'm looking for is just to also plot, on top of this original scatter graph, todays most recent data for x and y, so .iloc[-1]
for each, if you will.