I'm looking to plot error bars on a line plot I did using pandas's .plot() function
scores_xgb.plot(x='size', y='MSE_mean_tot', kind='line',logx=True,title='XGBoost 5 samples, 5 fold CV')
Running this gives me the following plot:

For plotting the error bars, I choose to use .errorbar() from Matplotlib. When running the cell
plt.errorbar(x=scores_xgb.size, y=scores_xgb.MSE_mean_tot, yerr=std_xgb ,title='XGBoost 5 samples, 5 fold CV')
plt.show()
I receive the following error message:
ValueError: 'x' and 'y' must have the same size
This confuses me, as I use the same Dataframe in both examples, each time using the same variable for x and y respectively, therefore it has the same size (12) both times.
NB: the yerr = std_xgb also has size 12.
sizecolumn in your dataframe?sizein this dataframe. It contains information about the number of rows of other dataframes on which my models are trained.