Skip to content

Instantly share code, notes, and snippets.

@SajidLhessani
Last active November 14, 2020 21:35
Show Gist options
  • Save SajidLhessani/36244841ed9b77dd0038460b8afaa1d9 to your computer and use it in GitHub Desktop.
Save SajidLhessani/36244841ed9b77dd0038460b8afaa1d9 to your computer and use it in GitHub Desktop.
import plotly.graph_objs as go
#Declare figure
fig = go.Figure()
#add a trace
fig.add_trace(go.Scatter(x=tesla_df.index, y=tesla_df['Close']))
#Update X and Y axis with title
fig.update_xaxes(
title = 'Date',rangeslider_visible=True
)
fig.update_yaxes(
title = 'Stock Price (USD)'
)
#Show
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment