Skip to content

Instantly share code, notes, and snippets.

@moritzkoerber
Created August 22, 2020 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritzkoerber/58478218af9dc11508521e83ba84f061 to your computer and use it in GitHub Desktop.
Save moritzkoerber/58478218af9dc11508521e83ba84f061 to your computer and use it in GitHub Desktop.
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(
go.Scatter(
x=df.temperature,
y=df.ice_cream_cones,
name="Ice Cream",
marker_color="#2457BD",
),
)
fig.add_trace(
go.Scatter(
x=df.temperature,
y=df.drinks,
name="Drinks",
marker_color="#F0B729",
)
)
fig.update_layout(
template="simple_white",
xaxis=dict(title_text="Temperature [°C]"),
yaxis=dict(title_text="Units Sold"),
)
fig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment