Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trace2 = go.Bar(
- x=temp_df1.city,
- y=temp_df1.id.cumsum().shift(1),
- #name='No. of stations',
- hoverinfo=None,
- marker=dict(
- color='rgba(1,1,1,0.0)'
- )
- )
- trace1 = go.Bar(
- x=temp_df1.city,
- y=temp_df1.id,
- name='No. of stations',
- text=temp_df1.id,
- textposition='outside',
- marker=dict(
- color=chosen_colors[0]
- )
- )
- data=[trace2, trace1]
- layout = go.Layout(
- title='No. of bike stations in Bay Area cities',
- xaxis=dict(
- title='City'
- ),
- yaxis=dict(
- title='No. of bike stations'
- ),
- barmode='stack',
- hovermode='closest',
- showlegend=False
- )
- figure = go.Figure(data=data, layout=layout)
- ply.iplot(figure)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement