cumsum = np.cumsum(x)
trace = go.Scatter(x=[i for i in range(len(cumsum))], y=10*cumsum/np.linalg.norm(cumsum),
marker=dict(color='rgb(150, 25, 120)'))
layout = go.Layout(
title="Cumulative Distribution Function"
)
fig = go.Figure(data=go.Data([trace]), layout=layout)
py.iplot(fig, filename='cdf-dataset')
import plotly.plotly as py
import plotly.graph_objs as go
from plotly.tools import FigureFactory as FF
import numpy as np
import pandas as pd
import scipy