#!/usr/bin/env python # coding: utf-8 # In[4]: import numpy as np from bokeh.plotting import figure from bokeh.io import output_notebook, show from bokeh.palettes import Accent3 as colors output_notebook() # In[5]: p = figure(height=300, width=500) for n, color in enumerate(colors): bottom = n top = n+.8 left = np.random.randint(2,5,10).cumsum() right = left[:-1] + np.diff(left) - np.random.randint(0,2,9) left = left[:-1] p.quad(top=top, bottom=bottom, left=left, right=right, color=color, legend=color) show(p) # In[ ]: