I'm using seaborn.lineplot()
to create a line figure like this (a line representing mean, surrounded by a band representing the std):
sns.lineplot(x="trial", y="rvalues", hue="subject", err_style="band", ci='sd', data=df)
My only issue is that since my data is not Gaussian, I care more about the median instead of mean. How to do that in Seaborn?
Or are there similar tools that are capable? I know I can do from scratch in matplotlib but that requires a lot of work to make it this nice.
estimator
should be a pandas method.
Use estimator=np.median
instead of estimator="median"
.
sns.lineplot(x="trial", y="rvalues", hue="subject", err_style="band",
ci='sd',
estimator=np.median,
data=df)