Skip to content

Instantly share code, notes, and snippets.

@hamletbatista
Last active February 28, 2019 22:38
Show Gist options
  • Save hamletbatista/79f400a1fbd83b37ea0ba0cc71f9b5b5 to your computer and use it in GitHub Desktop.
Save hamletbatista/79f400a1fbd83b37ea0ba0cc71f9b5b5 to your computer and use it in GitHub Desktop.
plot_data = [
go.Bar(
x = grouped_change['group'].tolist(),
y = grouped_change['difference'].tolist(),
marker = dict(
color = 'red'
),
name = 'Traffic Difference'
),
go.Bar(
x = grouped_change['group'],
y = grouped_change['ga:newUsers_before'],
marker = dict(
color = 'blue'
),
name = "Traffic Before"
),
go.Bar(
x = grouped_change['group'],
y = grouped_change['ga:newUsers_after'],
marker = dict(
color = 'orange'
),
name = "Traffic After"
)
]
fig = go.Figure(data=plot_data)
py.plot(fig, filename="base-bar.html")
HTML(filename="./base-bar.html")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment