import pandas as pd

from bokeh.charts import TimeSeries, show, output_file, vplot

# 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'])

data = dict(
    AAPL=AAPL['Adj Close'],
    Date=AAPL['Date'],
    MSFT=MSFT['Adj Close'],
    IBM=IBM['Adj Close'],
)

TOOLS="resize,pan,wheel_zoom,box_zoom,reset,previewsave"

output_file("timeseries.html")

# line simple
tsline = TimeSeries(
    data, x='Date', y=['IBM', 'AAPL'], legend=True,
    title="Timeseries (Line)", tools=TOOLS, ylabel='Stock Prices')

# line explicit
tsline2 = TimeSeries(
    data, x='Date', y=['IBM', 'AAPL'], color=['IBM', 'AAPL'],
    dash=['IBM', 'AAPL'], legend=True,
    title="Timeseries (Line Explicit)", tools=TOOLS, ylabel='Stock Prices')

# step
tsstep = TimeSeries(
    data, x='Date', y=['IBM', 'AAPL'], legend=True, builder_type='step',
    title="Timeseries (Step)", tools=TOOLS, ylabel='Stock Prices')

# point
tspoint = TimeSeries(
    data, x='Date', y=['IBM', 'AAPL'], marker=['IBM', 'AAPL'], legend=True,
    color=['IBM', 'AAPL'], builder_type='point',
    title="Timeseries (Point)", tools=TOOLS, ylabel='Stock Prices')

show(vplot(tsline, tsline2, tsstep, tspoint))

@@ -768,32 +768,40 @@
 Date', y=%5B'IBM',
+ 'MSFT',
  'AAPL'%5D, legend
@@ -799,32 +799,32 @@
 %5D, legend=True,%0A
-
     title=%22Times
@@ -934,32 +934,40 @@
 Date', y=%5B'IBM',
+ 'MSFT',
  'AAPL'%5D, color=
@@ -965,32 +965,40 @@
 %5D, color=%5B'IBM',
+ 'MSFT',
  'AAPL'%5D,%0A    da
@@ -999,32 +999,40 @@
     dash=%5B'IBM',
+ 'MSFT',
  'AAPL'%5D, legend
@@ -1164,32 +1164,40 @@
 Date', y=%5B'IBM',
+ 'MSFT',
  'AAPL'%5D, legend
@@ -1343,32 +1343,40 @@
 Date', y=%5B'IBM',
+ 'MSFT',
  'AAPL'%5D, marker
@@ -1375,32 +1375,40 @@
 , marker=%5B'IBM',
+ 'MSFT',
  'AAPL'%5D, legend
@@ -1431,16 +1431,24 @@
 =%5B'IBM',
+ 'MSFT',
  'AAPL'%5D

Add Microsoft stock prices