Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from plotly.graph_objs import graph_objs as go
- # For Running Plotly plot locally on your notebooks
- from plotly.offline import init_notebook_mode, iplot
- init_notebook_mode(connected=True)
- # Created Scatter object for both data-series
- trace0 = go.Scatter(
- x = df.index,
- y = df['aapl'],
- name="Apple"
- )
- trace1 = go.Scatter(
- x=df.index,
- y=df['ibm'],
- name="IBM"
- )
- # Defining Layout
- layout = go.Layout(
- title=go.layout.Title(
- text='Stock Prive Variation over Time'
- ),
- xaxis=go.layout.XAxis(
- title=go.layout.xaxis.Title(
- text='Month'
- )
- ),
- yaxis=go.layout.YAxis(
- title=go.layout.yaxis.Title(
- text='Stock Prices'
- )
- )
- )
- trace = [trace0,trace1]
- iplot(go.Figure(data=trace, layout=layout))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement