尝试移除y轴值。
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中删除y轴值?