我想用seaborn的regplot(比相關線更精細)得到精美的誤差線。seaborn設置誤差棒的厚度
下面的代碼(改編自here)對此進行了排序,但方式相當麻煩。有沒有更直接的方式來達到這個目標,也許通過kws?
with matplotlib.rc_context({"lines.linewidth": 1}):
sns.regplot('A', 'B', data=my_dataframe, x_jitter=10., ci=68, \
ax=ax, x_estimator=np.mean, \
scatter_kws={"s":150}, \
line_kws={"linewidth": 2 })
我覺得它在'seaborn'源代碼中是硬連線的。見[這一行](https://github.com/mwaskom/seaborn/blob/master/seaborn/linearmodels.py#L358) - 它的硬連線是'lines.linewidth * 1.75' – tom