Typical that having postwed a question an answer appears in another post from months ago
I just needed to add a color_discrete_mapp to my px.bar and it allows me to assign colors to my columns.
Working graphing code is as follows
fig = px.bar(df_merge[action_mask],
color_discrete_map={
'2019' : '#071633',
'2020' : '#0DEFFF'
}
)
# Change the bar mode
fig.update_layout(barmode='group',
title='<b>Number of actions by unit<b>',
xaxis_categoryorder = 'category ascending',
height = 800,
plot_bgcolor='rgba(0,0,0,0)',
showlegend=True
)
fig.update_xaxes(tickangle=45,
title_text='<b>Unit<b>',
showline=True,
linewidth=1,
linecolor='#071633'
)
fig.update_yaxes(title_text='<b>Count<b>',
showline=True,
linewidth=0.25,
linecolor='#071633')
fig.show()
``