Skip to content

Commit 418eb66

Browse files
committed
addressed comments
1 parent e7e4ba6 commit 418eb66

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

notebooks/time-series.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
jupyter:
33
jupytext:
4+
notebook_metadata_filter: all
45
text_representation:
56
extension: .md
67
format_name: markdown
@@ -10,6 +11,16 @@ jupyter:
1011
display_name: Python 3
1112
language: python
1213
name: python3
14+
language_info:
15+
codemirror_mode:
16+
name: ipython
17+
version: 3
18+
file_extension: .py
19+
mimetype: text/x-python
20+
name: python
21+
nbconvert_exporter: python
22+
pygments_lexer: ipython3
23+
version: 3.6.7
1324
plotly:
1425
description: How to plot date and time in python.
1526
display_as: financial
@@ -62,9 +73,8 @@ import datetime
6273
x = [datetime.datetime(year=2013, month=10, day=4),
6374
datetime.datetime(year=2013, month=11, day=5),
6475
datetime.datetime(year=2013, month=12, day=6)]
65-
data = [go.Scatter(x=x, y=[1, 3, 6])]
6676

67-
fig = go.Figure(data=data)
77+
fig = go.Figure(data=[go.Scatter(x=x, y=[1, 3, 6])])
6878
# Use datetime objects to set xaxis range
6979
fig.update(layout_xaxis_range=[datetime.datetime(2013, 10, 17),
7080
datetime.datetime(2013, 11, 20)])
@@ -105,17 +115,11 @@ import pandas as pd
105115

106116
df = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv")
107117

108-
trace_high = go.Scatter(
109-
x=df.Date,
110-
y=df['AAPL.High'],
111-
name="AAPL High",
112-
line_color='deepskyblue')
118+
trace_high = go.Scatter(x=df.Date, y=df['AAPL.High'], name="AAPL High",
119+
line_color='deepskyblue')
113120

114-
trace_low = go.Scatter(
115-
x=df.Date,
116-
y=df['AAPL.Low'],
117-
name="AAPL Low",
118-
line_color='dimgray')
121+
trace_low = go.Scatter(x=df.Date, y=df['AAPL.Low'], name="AAPL Low",
122+
line_color='dimgray')
119123

120124
fig = go.Figure(data=[trace_high, trace_low])
121125
fig.update(layout_title_text='Time Series with Rangeslider',

0 commit comments

Comments
 (0)