I have had a thorough look at the documentation and past issues on here, but feel sufficiently strongly about this feature that I thought I would present an argument for it again, though with a few additional points as well.
I want to start out with a bit of praise: I am really enjoying seaborn and it is a much saner tool to use than straight matplotlib. I've run into the same problem a few times now, however, which is the fact that seaborn natively supports calculating errorbars using bootstrapping, but the currently (as far as I can tell) isn't a way to specify precomputed errors.
Firstly, on a philosophical level I find it a bit too magical to have them computed for me, though this functionality can occasionally be nice and I am sure some people are really keen to do errorbars this way. Coming from physics, I often have dataframes with these precomputed using other techniques or need to do large bootstrappings which may be accelerated using custom code.
The previous argument against adding the option to specify precomputed errorbars has been that these can easily be implemented using plt.errorbar, but when working with a dataframe where you might be using a column as a categorial, this is non-trivial to implement.
Given there is already the code in place to render errorbars, would it not be fairly easy to implement xerr and yerr arguments that can specify columns specifying the error?
An example use-case:
df = pd.DataFrame({
"x": [1, 2, 3, 4, 5, 1, 2, 3, 4, 5],
"y": [1, 2, 3, 4 ,5, 2, 4, 6, 8 ,10],
"yerr": [0.5, 0.25, 0.5, 0.75, 0.5, 0.25, 0.5, 0.75, 0.5, 0.25],
"cat": ["A"] * 5 + ["B"] * 5,
})
sns.lineplot(data=df, x="x", y="y", hue="cat")
# sns.lineplot(data=df, x="x", y="y", yerr="yerr", hue="cat")

Ideally I would want to be able to use the bottom line.
Considerations:
Apologies for reraising this issue, I understand completely if this is not something that seaborn wants to implement, but to me it seems like a really neat feature that might be fairly easy to implement. I think it is a feature that quite a few people want, judging from:
I have had a thorough look at the documentation and past issues on here, but feel sufficiently strongly about this feature that I thought I would present an argument for it again, though with a few additional points as well.
I want to start out with a bit of praise: I am really enjoying
seabornand it is a much saner tool to use than straightmatplotlib. I've run into the same problem a few times now, however, which is the fact thatseabornnatively supports calculating errorbars using bootstrapping, but the currently (as far as I can tell) isn't a way to specify precomputed errors.Firstly, on a philosophical level I find it a bit too magical to have them computed for me, though this functionality can occasionally be nice and I am sure some people are really keen to do errorbars this way. Coming from physics, I often have dataframes with these precomputed using other techniques or need to do large bootstrappings which may be accelerated using custom code.
The previous argument against adding the option to specify precomputed errorbars has been that these can easily be implemented using
plt.errorbar, but when working with a dataframe where you might be using a column as a categorial, this is non-trivial to implement.Given there is already the code in place to render errorbars, would it not be fairly easy to implement
xerrandyerrarguments that can specify columns specifying the error?An example use-case:
Ideally I would want to be able to use the bottom line.
Considerations:
yerris defined ignore or warn iferrorbaris setxerris difficult withlineplot, but might for nicescatterplotyerr/xerrshould follow similar logic as https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.errorbar.htmlApologies for reraising this issue, I understand completely if this is not something that seaborn wants to implement, but to me it seems like a really neat feature that might be fairly easy to implement. I think it is a feature that quite a few people want, judging from: