0

I have a dataframe that looks as follows

ACQUISITION_CHANNEL RIDER_ID
Organic 2735
Referral 1216
Digital 751
Offline 296
Unknown 108
Job Platforms 67

And I am making a bar plot as below using:

channel_rider_count.plot(kind='bar', 
                         legend=None)

plt.title('Count of Riders by Acquisition Channel')
plt.xlabel('Acquisition Channel')
plt.ylabel('Count')

How can I change the colour of the 'Referral' bar but leave the others the same?

  • Does [this answer](https://stackoverflow.com/a/59347895/2827397) solve your problem? – DaveL17 Apr 23 '21 at 21:10
  • Does this answer your question? [Update Single Bar in Matplotlib](https://stackoverflow.com/questions/59347557/update-single-bar-in-matplotlib) – DaveL17 Apr 23 '21 at 21:10

1 Answers1

0
colors = ['b','r','b','b','b','b','b']

channel_rider_count.plot(kind='bar', 
                         legend=None, 
                         color=colors)

plt.title('Count of Riders by Acquisition Channel')
plt.xlabel('Acquisition Channel')
plt.ylabel('Count')
imdevskp
  • 2,103
  • 2
  • 9
  • 23