Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created December 23, 2020 14:16
Embed
What would you like to do?
trace1 = go.Bar(x=matches_played.index,y=matches_played['Total Matches'],
name='Total Matches',opacity=0.4)
trace2 = go.Bar(x=matches_played.index,y=matches_played['wins'],
name='Matches Won',marker=dict(color='red'),opacity=0.4)
trace3 = go.Bar(x=matches_played.index,
y=(round(matches_played['wins']/matches_played['Total Matches'],3)*100),
name='Win Percentage',opacity=0.6,marker=dict(color='gold'))
data = [trace1, trace2, trace3]
layout = go.Layout(title='Match Played, Wins And Win Percentage',xaxis=dict(title='Team'),
yaxis=dict(title='Count'),bargap=0.2,bargroupgap=0.1, plot_bgcolor='rgb(245,245,245)')
fig = go.Figure(data=data, layout=layout)
iplot(fig)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment