In [1]:
from lightning import Lightning
from numpy import random, asarray, amin, concatenate, column_stack
from seaborn import color_palette
from sklearn import datasets
In [2]:
lgn = Lightning(ipython=True, host='http://public.lightning-viz.org')
In [3]:
n = 100
x = random.rand(n)*100
y = random.rand(n)*100
z = random.rand(n)*100
lgn.scatter3(x,y,z)
Out[3]:
In [4]:
n = 100
x = random.rand(n)*100
y = random.rand(n)*100
z = random.rand(n)*100
c = [240,117,145]
lgn.scatter3(x,y,z,size=4,color=c)
Out[4]:
In [5]:
n = 100
x = random.rand(n)*100
y = random.rand(n)*100
z = random.rand(n)*100
c = [asarray(color_palette('Blues', 100)[random.choice(range(100))])*255 for i in range(n)]
s = random.rand(n)*8+1
lgn.scatter3(x, y, z, color=c, size=s)
Out[5]:
In [6]:
n = 500
x = random.rand(n)*255
y = random.rand(n)*255
z = random.rand(n)*255
c = column_stack((x,y,z))
lgn.scatter3(x,y,z,color=c, size=3)
Out[6]: