python 3.x - change rotation of xticks -
i plotting boxplot , countplot.
fig, (axis1,axis2) = plt.subplots(2,1,figsize = (15,5)) sns.boxplot(x= 'neighborhood', y='saleprice', data=house_df,ax=axis1) sns.barplot(x = 'bsmtqual', y = 'saleprice', data = house_df, order = ['ex','gd','fa', 'ta','no basement'],ax = axis2)
i try change rotation of each using
xt = plt.xticks(rotation = 45)
however, changes lables second plot. how can change lables of both plots?
i have tried
for ax in fig.axes: plt.sca(ax) plt.xticks(rotation = 45)
but doesnt work.
also how can rename labels?
Comments
Post a Comment