In [1]:
import os
from lightning import Lightning
from numpy import random
In [2]:
lgn = Lightning(ipython=True, host='http://public.lightning-viz.org')
We'll generate some normally distributed values and make a histogram
In [3]:
values = random.randn(100)
lgn.histogram(values, 10, zoom=False)
Out[3]:
Change the number of bins
In [4]:
lgn.histogram(values, 50, zoom=False)
Out[4]:
If we turn on zooming, we can change the number of bins dynamically by zooming in and out -- try it!
In [5]:
lgn.histogram(values, 25, zoom=True)
Out[5]: