【发布时间】:2020-11-25 01:34:18
【问题描述】:
在将 yticklabels 颜色应用到白色之前,下图是对齐的 不知道为什么改了enter image description here
%matplotlib inline
import matplotlib.pyplot as plt
import seaborn
sns.set(rc={'axes.facecolor' : 'darkslategrey', 'figure.facecolor' : 'darkslategray', 'grid.color' : 'k', 'axes.edgecolor' : 'black',
})
g = sns.catplot(data=desert_data,x='total_time',y='name', kind='bar', color='yellow', saturation=.7, height=3.5, aspect=2)
g.set_xticklabels(color='white')
g.set_yticklabels(color='white')
g.set_xlabels('')
g.set_ylabels('')
g.tight_layout()
【问题讨论】: