在一台笔记本电脑(Windows 7)上使用 seaborn 在 ipython notebook 中内联进行箱线图时,该图将显示异常值。但是,在我的 macbook 和 Windows 10 桌面上执行相同的代码时,未显示异常值。我的代码是:
sns.set_context("talk", font_scale=1)
sns.boxplot(diff.pay_ratio, groupby=diff.status)
这在此处作为 matplotlib 使用 edgewidth 参数的问题进行了讨论: https ://github.com/mwaskom/seaborn/issues/102
对我有用的修复是重置有问题的 matplotlib 参数。
matplotlib.rc("lines", markeredgewidth=0.5)