i am trying to add errorbars using plt.errorbar
to a pointplot
in seaborn:
import matplotlib
import matplotlib.pylab as plt
import seaborn as sns
import pandas
sns.set_style("white")
data = pandas.DataFrame({"x": [0.158, 0.209, 0.31, 0.4, 0.519],
"y": [0.13, 0.109, 0.129, 0.250, 1.10],
"s": [0.01]*5})
plt.figure()
sns.pointplot(x="x", y="y", data=data)
plt.errorbar(data["x"], data["y"], yerr=data["s"])
plt.show()
however the two plots look totally different even though the identical data is being plotted. what explains this and how can errorbars be added to a pointplot?