Plotting Error Bars Matplotlib, Using Pandas Data Frame
I'm sure this is relatively easy, but I can't seem to make it work. I would like to plot this df, with date as the x-axis, gas as the y-axis and std as errorbars using the matplotl
std
is a method on a dataframe, ex df.std()
.
Use
plt.errorbar(trip.index, trip['gas'], yerr=trip['std'])
or if you have mpl1.5.0+
plt.errorbar(trip.index, 'gas', yerr='std', data=trip)
Post a Comment for "Plotting Error Bars Matplotlib, Using Pandas Data Frame"