#!/usr/bin/env python
# coding: utf-8
# #
Histogram plots in Lightning
# ##
Setup
# In[1]:
import os
from lightning import Lightning
from numpy import random
# ## Connect to server
# In[2]:
lgn = Lightning(ipython=True, host='http://public.lightning-viz.org')
# ##
Make a histogram
# We'll generate some normally distributed values and make a histogram
# In[3]:
values = random.randn(100)
lgn.histogram(values, 10, zoom=False)
# Change the number of bins
# In[4]:
lgn.histogram(values, 50, zoom=False)
# ##
Zooming for dynamic bins
# 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)