使用Seaborn 0.6.0,我试图覆盖pointplot
一个violinplot
.我的问题是,如下图所示,来自各个观察结果的'棒' violinplot
被绘制在标记之上pointplot
.
import seaborn as sns
import matplotlib.pyplot as plt
fig, ax = plt.subplots(1, figsize=[12,8])
sns.violinplot(x="day", y="total_bill", hue="smoker", data=tips,
split=True, inner='stick', ax=ax, palette=['white']*2)
sns.pointplot(x="day", y='total_bill', hue="smoker",
data=tips, dodge=0.3, ax=ax, join=False)
Run Code Online (Sandbox Code Playgroud)
仔细观察这个图,看起来绿色的误差栏是在violoin棒上方(周六看),但蓝色的误差条,蓝色和绿色的点都画在小提琴棒的下方.
我尝试将zorder
两种功能的不同组合传递给它,但这并没有改善情节外观.我能做些什么来让点图中的所有元素出现在violoinplot的所有元素之上?