In [4]:
import numpy as np
from bqplot import *

In [5]:
xs = LinearScale()
ys = LinearScale()
x = np.arange(100)
y = np.cumsum(np.random.randn(2, 100), axis=1) #two random walks

line = Lines(x=x, y=y, scales={'x': xs, 'y': ys}, colors=['red', 'green'])
xax = Axis(scale=xs, label='x', grid_lines='solid')
yax = Axis(scale=ys, orientation='vertical', tick_format='0.2f', label='y', grid_lines='solid')

Figure(marks=[line], axes=[xax, yax], animation_duration=1000)



In [6]:
# update data of the line mark
line.y = np.cumsum(np.random.randn(2, 100), axis=1)

In [ ]: