This notebook is just used as scratch paper.


In [11]:
# nbi:hide
import ipywidgets as widgets
from ipywidgets import interact, interactive, interact_manual
import nbinteract as nbi
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline

In [13]:
def x_vals(n):
    return np.arange(n)

def y_vals(xs, n):
    return xs ** n


nbi.line(x_vals, y_vals,
         n=(1, 10))



In [2]:
# nbi:right
@interact(x=(0, 10))
def plot(x):
    plt.plot(np.arange(x), np.arange(x) ** 2)



In [3]:
# nbi:left
@interact(x=(0, 10))
def square(x):
    return x * x


This cell should display as a full row.


In [4]:
# nbi:hide_in
@interact(x=(0, 10))
def plot(x):
    plt.plot(np.arange(x), np.exp(np.arange(x)))



In [5]:
# nbi:right
@interact(x=(0, 10))
def plot(x):
    plt.plot(np.arange(x), np.arange(x) ** 2)



In [6]:
# nbi:left
@interact(x=(0, 10))
def square(x):
    return x * x



In [7]:
# nbi:right
@interact(x=(0, 10))
def plot(x):
    plt.plot(np.arange(x), np.arange(x) ** 3)