x标签的计数图和设置间隔

时间:2019-07-17 10:38:09

标签: python matplotlib

我打算对这些数据进行计数:

!(https://imgur.com/a/iIr5ut5)!

然后,我想以10为间隔

有人可以帮助我吗?

我已经尝试过了...

import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker

tick_spacing = 10

b = sns.countplot(df['Pysics'])
b.axes.set_title('Distribution of Grades', fontsize = 30)
b.set_xlabel('pysics Grade', fontsize = 10)
#ax = sns.countplot(x="Column", data=ds)

ax.set_xticklabels(ax.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
b.set_ylabel('Count', fontsize = 'medium')
plt.show()

0 个答案:

没有答案