Trying to plot a scatter plot with error bars in Seaborn from data in a pandas dataframe, and conditionally color points if they are not in the confidence interval of the other axis. Here is the code so far:
sns.lmplot(x='reg', y='rd_diff',data = lreg_2016, fit_reg=False)
plt.errorbar(lreg_2016['reg'].values, lreg_2016['rd_diff'].values, yerr= lreg_2016['conf'].values,fmt='o', markersize=4)
plt.show()
What I want is something of a conditional like this:
if lreg_2016['rd_diff'].values > (lreg_2016['reg'].values + lreg_2016['conf'].values) or
lreg_2016['rd_diff'].values < (lreg_2016['reg'].values - lreg_2016['conf'].values):
color of point = 'red'
Thanks!