import nbinteract as nbi
import numpy as np
from numpy import arange
def x_fn(max):
    return np.arange(0, max + 1)

def y_fn(xs, noise):
    return xs + np.random.normal(0, scale=noise, size=len(xs))


options = {
    'title': 'Line chart',
    'xlabel': 'x-values (max)',
    'ylabel': 'y-values (noise)',    
    'xlim': (0, 50),
    'ylim': (-20, 70),
    'animation_duration': 500
}

layouts = {
    'plot_height': '480px',
    'plot_width': '800px',
}

line_chart = nbi.line(
    x_fn,
    y_fn,
    max=(10, 50),
    noise=(0, 10),
    options=options,
    layouts=layouts
)

line_chart