from lightning import Lightning
from numpy import random, asarray, concatenate
from sklearn import datasets
lgn = Lightning(ipython=True, host='http://public.lightning-viz.org')
Connected to server at http://public.lightning-viz.org
The image plot type shows an image with zooming and panning.
imgs = datasets.load_sample_images().images
lgn.image(imgs[0])
Single-channel images will automatically be presented as grayscale.
imgs = datasets.load_sample_images().images
lgn.image(imgs[0][:,:,0])
The usual sizing arguments can be used to set the image size in pixels.
imgs = datasets.load_sample_images().images
lgn.image(imgs[0], width=400)