1
このコード内の棒の色を変更したいのは、すべての棒が同じ色であり、maxtweetに格納されている各棒の上に異なる値を表示したい、p、n変数。Matplotlib異なる色の棒グラフと値を表示する棒グラフ
x=[]
x.append(max_tweets)
x.append(p)
x.append(n)
label=('tweets','positivity','nagitivity')
label_pos=np.arange(len(label))
plt.bar(label_pos,x,align='center',color='k')
plt.xticks(label_pos,label)
plt.xlabel('People Behaviour and Emotions')
plt.title('Sentiment Analysis')
plt.show()