grid layout - Seaborn PairGrid: show axes tick-labels for each subplot -
with seaborn.pairgrid
there way show axes tick-labels each subplot? (an equivalent sharex=false, sharey=false
in case of seaborn.facetgrid
)
import pandas pd import numpy np import seaborn sns import matplotlib.pyplot plt df = pd.dataframe() n in ['a', 'b']: tmp = pd.dataframe({'name': [n] * 100, 'prior': [1, 10] * 50, 'post': [1, 10] * 50}) df = df.append(tmp) g = sns.pairgrid(df, hue='name', diag_sharey=false) g.map_offdiag(sns.regplot, fit_reg=false, x_jitter=.1) g.map_diag(sns.distplot, kde=false)
answer found here: http://stackoverflow.xluat.com/questions/31094436/show-y-ticklabels-in-a-seaborn-pairplot
for ax in g.axes.flat: _ = plt.setp(ax.get_yticklabels(), visible=true) _ = plt.setp(ax.get_xticklabels(), visible=true)
where precised _ = ...
here suppress unwanted print out in interactive environments.
Comments
Post a Comment