import nbinteract as nbi
import numpy as np
def x_fn(n):
    return np.random.choice(100, n)
    
def y_fn(xs):
    return np.random.choice(100, len(xs))


options = {
    'title': 'Scatter chart',
    'marker': 'circle',
    'animation_duration': 1000,    
    'xlabel': 'x-values',
    'ylabel': 'y-values',
    'xlim': (0, 100),
    'ylim': (0, 100)
}

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

scatter_chart = nbi.scatter(
    x_fn,
    y_fn,
    n=(10,200),
    options=options,
    layouts=layouts
)

scatter_chart