为了制作上面的情节,我这样做:
import seaborn as sns
g = sns.factorplot('State', ' % Overall Match', hue='experiment', data=df_states, col='percentile', kind='box', col_wrap=2, sharex=False)
有没有办法不显示没有相关数据的x轴标签?
- 编辑:数据可在此处获取:https://www.dropbox.com/s/pn7j95sjjb9n8t0/old_all.csv?dl=0
答案 0 :(得分:1)
我想我会手动执行此操作:
fig, ax_array = plt.subplots(2,2)
axes = ax_array.flatten()
for ax, perc in zip(axes, df_states['percentile'].unique()):
sns.boxplot('State', ' % Overall Match', hue='experiment',
data=df_states[df_states['percentile'] == perc], ax=ax)