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()