plotly
is a plotting engine for fast easy generation of interactive D3.js plots. Cf. http://plot.ly.
In [2]:
import numpy as np
import pandas as pd
import pandas.io.data as web
import plotly.plotly as py
import cufflinks as cf
In [3]:
py.sign_in('Python-Demo-Account', 'gwt101uhh0')
In [4]:
symbols = ['AAPL', 'MSFT', 'YHOO']
In [5]:
data = pd.DataFrame()
for sym in symbols:
data[sym] = web.DataReader(sym, data_source='yahoo')['Adj Close']
In [6]:
data.tail()
Out[6]:
In [7]:
data.iplot(filename='financial', world_readable=True)
Out[7]:
In [8]:
data['AAPL'].iplot(filename='best_fit', bestfit=True, colors=['pink'],
bestfit_colors=['blue'], world_readable=True)
Out[8]: