In [ ]:
from collections import OrderedDict
import numpy as np
from bokeh.charts import Line, output_notebook, show
output_notebook()

# create some example data
simple_values = OrderedDict(
    python=[2, 3, 7, 5, 26, 221, 44, 233, 254, 265, 266, 267, 120, 111],
    pypy=[12, 33, 47, 15, 126, 121, 144, 233, 254, 225, 226, 267, 110, 130],
    jython=[22, 43, 10, 25, 26, 101, 114, 203, 194, 215, 201, 227, 139, 160],
)

# create an area chart
line = Line(
    simple_values, title="Area Chart", xlabel='time',
    ylabel='memory', notebook=True, legend="top_left"
)
show(line)

In [ ]:
import pandas as pd

# Here is some code to read in some stock data from the Yahoo Finance API
AAPL = pd.read_csv(
    "http://ichart.yahoo.com/table.csv?s=AAPL&a=0&b=1&c=2000&d=0&e=1&f=2010",
    parse_dates=['Date'])
MSFT = pd.read_csv(
    "http://ichart.yahoo.com/table.csv?s=MSFT&a=0&b=1&c=2000&d=0&e=1&f=2010",
    parse_dates=['Date'])
IBM = pd.read_csv(
    "http://ichart.yahoo.com/table.csv?s=IBM&a=0&b=1&c=2000&d=0&e=1&f=2010",
    parse_dates=['Date'])

sxyvalues = OrderedDict(
    AAPL=AAPL['Adj Close'],
    MSFT=MSFT['Adj Close'],
    IBM=IBM['Adj Close'],
)

# create an area chart
line = Line(
    sxyvalues, title="Medals",legend="top_left",
    ylabel='Performance', notebook=True,
)
show(line)

In [ ]:
# create an area chart
df = pd.DataFrame(sxyvalues)
line = Line(
    df, title="Area Chart", ylabel='Performance', notebook=True,
)
show(line)

In [ ]:
line = Line(
    list(sxyvalues.values()), title="Line Chart",
    ylabel='Performance', notebook=True, legend="top_left"
)
show(line)

In [ ]:
from blaze import Data, into
bvalues = Data(pd.DataFrame(simple_values))
line = Line(
    bvalues, title="Line Chart",
    ylabel='Performance', notebook=True, legend="top_left"
)
show(line)

In [ ]:
from bokeh.sampledata import iris
from os.path import dirname, join

bbvalues = Data(join(dirname(iris.__file__), 'iris.csv'))
columns = ['sepal_length', 'sepal_width', 'petal_length', 'petal_width']
result = bbvalues[columns]
line = Line(
    result, title="Line Chart",
    ylabel='Petals', notebook=True, legend="top_left"
)
show(line)

In [ ]: