You could color each year a different color.
Create some data:
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import cm
import numpy as np
# here's some data
N=50
df = pd.DataFrame({'year': np.random.randint(2005,2015,N),
'month': np.random.randint(1,12,N),
'count': np.random.randint(1,1500,N)})
df.sort_values(by=['year', 'month'],inplace=True)
And then create a color array with a color for each year:
# color map based on years
yrs = np.unique(df.year)
c = cm.get_cmap('tab20', len(yrs))
## probably a more elegant way to do this...
yrClr = np.zeros((len(df.year),4))
for i, v in enumerate(yrs):
yrClr[df.year==v,:]=c.colors[i,:]
# then use yrClr for color
df.plot(kind='bar', x='month', y='count', color=yrClr, title="Num per year")
UPDATE: it might also help to have your x axis combined Month+Year, like this.
fig, axs = plt.subplots(figsize=(12, 4))
df['MonthYr']=pd.to_datetime(df.assign(day=1)[['year','month','day']]).dt.strftime('%m-%Y')
df.plot(kind='bar', x='MonthYr', y='count', color=yrClr, title="Num per year",ax=axs)
