# my 'new_ba', 'route', and 'sentiment' are defined
plt.figure(figsize = (10,5))
plt.title('Sentiment of Route')
colors = {'Positive': 'green', 'Neutral': 'blue', 'Negative': 'red'}
sns.histplot(data=new_ba, x='route', hue='sentiment', palette=colors.values())
plt.xticks(rotation=45, ha='right')
plt.savefig('problem.png')
plt.show()
I don't get an error, but the legend has different colors than the histplot
.