🏥 🏭 Working on the COVID-19 response in Canada? Plotly & the Canadian government can help you and your organization. Learn more and get in touch.

Viridis color scale for grouped bar plots in Python plotly

Hi, I am trying to produce a bar chart that is grouped on the x-axis (in my plot: the month) and color-coded for each category inside each group. Similar to this chart:
ggplot2-barplot-numeric-x-axis-data-visualization-2 (taken from http://www.sthda.com/)

It should also show a legend. Since the categories have a natural ordering, I would like to use the Viridis color scale. However, I cannot get it to work!

Here is my code:

y = [1,2,3,4,5,6,7,8,9,10]
x = ['202003','202003','202003','202003','202003','202004','202004','202004','202004','202004']
groups= ['first','second','third','fourth','fith','first','second','third','fourth','fith']

fig = go.Figure(
    [
        go.Bar(
            x=x,
            y=y,
            name=group,
            marker={'color': group,'colorscale': 'Viridis'}
        )
        for group in groups
    ]
)

fig.update_layout(
    xaxis=dict(type="category"),
)

fig.show()

Thank you!