Created
April 7, 2018 05:45
-
-
Save iMel408/945a9ccdbd6c1b205490c920668a7a8b to your computer and use it in GitHub Desktop.
helloworld.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import plotly.plotly as py | |
import plotly.graph_objs as go | |
import pandas as pd | |
df = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv") | |
trace_high = go.Scatter( | |
x=df.Date, | |
y=df['AAPL.High'], | |
name = "AAPL High", | |
line = dict(color = '#17BECF'), | |
opacity = 0.8) | |
trace_low = go.Scatter( | |
x=df.Date, | |
y=df['AAPL.Low'], | |
name = "AAPL Low", | |
line = dict(color = '#7F7F7F'), | |
opacity = 0.8) | |
data = [trace_high,trace_low] | |
layout = dict( | |
title = "Manually Set Date Range", | |
xaxis = dict( | |
range = ['2016-07-01','2016-12-31']) | |
) | |
fig = dict(data=data, layout=layout) | |
py.iplot(fig, filename = "Manually Set Range") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment