Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data=[]
- trace_names=['Subscriber', 'Customer']
- for i in range(2):
- data.append(
- go.Histogram(
- x=trip[(trip.subscription_type==trace_names[i]) & (trip.duration_min<60)].duration_min,
- name=trace_names[i],
- marker=dict(
- color=chosen_colors[i]
- ),
- opacity=0.5
- )
- )
- layout = go.Layout(
- title='Distribution of bike trip duration in Bay Area',
- barmode='overlay',
- xaxis=dict(
- title='Trip Duration (minutes)'
- ),
- yaxis=dict(
- title='Count'
- ),
- #hovermode='closest',
- #showlegend=True
- )
- figure = go.Figure(data=data, layout=layout)
- ply.iplot(figure)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement