import sys, math, json
from bokeh.plotting import figure
from bokeh.io import show
from bokeh.models import ColumnDataSource

fil = open('sampledata', 'r')
b, s = json.loads(fil.read())
fil.close()

buys = ColumnDataSource(data=b)
sells = ColumnDataSource(data=s)

minx = buys.data['prices'][0] * 0.98
maxx = sells.data['prices'][0] * 1.02
plot = figure(lod_threshold=None, x_range=(minx, maxx), y_range=(0, 400000), plot_width=1600)
plot.patch('prices', 'amounts', source=buys, fill_color='#00a000', line_alpha=0)
plot.patch('prices', 'amounts', source=sells, fill_color='#a00000', line_alpha=0)

show(plot)