答案 0 :(得分:-2)
我发现有些人将此图称为Mean indexed bar chart
。使用seaborn,可以使用如下代码:
import seaborn as sns
import matplotlib.pyplot as plt
sns.set(style="white", context="talk")
f, ax1 = plt.subplots(figsize=(7, 5), sharex=True)
mean = df.mean()
y2 = mean - df["your column"]
sns.barplot(x=dfCopy.index, y=y2, palette="deep", ax=ax1)
ax1.axhline(0, color="k", clip_on=False)
ax1.set_ylabel("Diverging")
# Finalize the plot
sns.despine(bottom=True)
plt.setp(f.axes, yticks=[])
plt.tight_layout(h_pad=2)