{"cells": [{"cell_type": "markdown", "metadata": {}, "source": ["# lightning-python\n", "\n", "*lightning-python* is a wrapper for the javascript library [lightning](http://lightning-viz.org/)."]}, {"cell_type": "markdown", "metadata": {}, "source": ["[documentation](http://lightning-viz.org/clients/#python) [installation](http://lightning-viz.org/clients/#python) [source](https://github.com/lightning-viz/lightning-python) [tutorial](http://nbviewer.jupyter.org/github/lightning-viz/lightning-example-notebooks/blob/master/misc/severless.ipynb) [gallerie](http://lightning-viz.org/visualizations/gallery/)"]}, {"cell_type": "code", "execution_count": 1, "metadata": {"collapsed": false}, "outputs": [{"data": {"text/html": ["
run previous cell, wait for 2 seconds
\n", ""], "text/plain": [""]}, "execution_count": 2, "metadata": {}, "output_type": "execute_result"}], "source": ["from jyquickhelper import add_notebook_menu\n", "add_notebook_menu()"]}, {"cell_type": "markdown", "metadata": {}, "source": ["# startup"]}, {"cell_type": "markdown", "metadata": {}, "source": ["The module requires module [lightning-python](https://github.com/lightning-viz/lightning-python). Check the [gallery](http://lightning-viz.org/)."]}, {"cell_type": "code", "execution_count": 2, "metadata": {"collapsed": false}, "outputs": [{"data": {"text/html": ["
Lightning initialized
"], "text/plain": [""]}, "metadata": {}, "output_type": "display_data"}, {"data": {"text/html": [""], "text/plain": [""]}, "metadata": {}, "output_type": "display_data"}, {"name": "stdout", "output_type": "stream", "text": ["Running local mode, some functionality limited.\n", "\n"]}], "source": ["from lightning import Lightning\n", "lgn = Lightning(ipython=True, local=True)"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## scatter plot"]}, {"cell_type": "code", "execution_count": 3, "metadata": {"collapsed": false}, "outputs": [{"data": {"text/html": ["\n", "\n", "\n", "\n", "
\n", "\t
\n", "\t\t
\n", "\t\t\t
\n", "\t\t
\n", "\t
\n", "
\n", "\n", "\n", ""], "text/plain": [""]}, "execution_count": 4, "metadata": {}, "output_type": "execute_result"}], "source": ["from numpy import random\n", "x = random.randn(1000)\n", "y = random.randn(1000)\n", "v = random.randn(1000)\n", "\n", "lgn.scatter(x, y, alpha=0.5, values=v, colormap='Reds')"]}, {"cell_type": "code", "execution_count": 4, "metadata": {"collapsed": true}, "outputs": [], "source": []}], "metadata": {"kernelspec": {"display_name": "Python 3", "language": "python", "name": "python3"}, "language_info": {"codemirror_mode": {"name": "ipython", "version": 3}, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2"}}, "nbformat": 4, "nbformat_minor": 2}