In [1]:
from math import pi
import pandas as pd

from bokeh.sampledata.stocks import MSFT
from bokeh.plotting import figure, output_notebook, show
In [2]:
df = pd.DataFrame(MSFT)[:50]
df['date'] = pd.to_datetime(df['date'])

mids = (df.open + df.close)/2
spans = abs(df.close-df.open)

inc = df.close > df.open
dec = df.open > df.close
w = 12*60*60*1000 # half day in ms
In [3]:
output_notebook()