试图删除 yaxis 值。
d = pd.DataFrame({'row':['a']*9 + ['b']*9 + ['c']*9,
'col': ['fft','krn','bycp']*9,
'val':np.random.randn(27)})
print 'data', d
试图抢图不起作用。
#f, (ax1, ax2) = plt.subplots(2, 1, sharex=True)
f,ax = plt.subplots()
r= d['row'].unique()
(c1, c2, c3, c4, c5) = sns.color_palette("husl", 6)[:5]
g = sns.FacetGrid(d, col='col', row='row',size=.7, aspect=5, palette="husl",margin_titles=True)
g.map(sns.rugplot,'val',height=.12)
print sns.axes_style()
despine 不会删除这些值
sns.despine(left='False')
g.fig.subplots_adjust(wspace=.1, hspace=.02);
g.set_axis_labels(['a','b','c'], 'values');
ax = plt.gcf().axes
ax.axes.get_yaxis().set_visible(False)
ax.set_visible(False)
plt.show()
plt.gcf().axes
给AttributeError: 'list' object has no attribute 'axes'
get_yaxis()
什么也没做。
如何从 seaborn 中的 FacetGrid 中删除 yaxis 值?