私はこのようなグラフを持っています、それは21日間の毎時のデータを記録します、ラベルは次のようです:01-30 00:00、01-30 01:00 ....今は読めないので、1つだけ設定したい1日あたりのラベルなので、毎日の最初のラベルのみを表示します:01-30 00:00、01-31 00:00など
私のコードは:
fig1 = plt.figure()
ax = fig1.add_subplot(111)
ind = np.arange(len(timelist))
ax.bar(ind,reqlist,color='b')
ax.set_xlim((0,len(timelist)))
ax.set_ylabel('Number of request/video',size='x-large')
ax.set_title('Request per hour North',size='xx-large')
ax.set_xticks(ind)
ax.set_xticklabels(timelist,rotation=17)
タイムリストは文字列のリストです:["01-30 00:00"、 "01-30 00:01" .....]