Is there a way to set the capsize for lineplot in seaborn (with err_style="bars") , in pointplot you can set the capsize with a variable ax = sns.pointplot(x="day", y="tip", data=tips, capsize=.2)
is it also possible with lineplot (I did not manage to find a variable for it)?
This is the example in seaborn website:
import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
fmri = sns.load_dataset("fmri")
ax = sns.lineplot(x="timepoint", y="signal", hue="event",
err_style="bars", ci=68, data=fmri)
Thanks
I found the answer, the capsize can be changed if we pass a dic with capsize value to err_kws, as follows:
import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
fmri = sns.load_dataset("fmri")
ax = sns.lineplot(x="timepoint", y="signal", hue="event",
err_style="bars", ci=68, data=fmri,err_kws={'capsize':1})
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.