In [ ]:
import pandas as pd
import numpy as np
from bokeh.charts import Dot, output_notebook, show
In [ ]:
output_notebook()
In [ ]:
# create some example data
data = {
'sample': ['lists', 'loops', 'dicts', 'gen exp', 'exceptions']*3,
'interpreter': [item for name in ['python', 'pypy', 'jython'] for item in [name]*5],
'timing': [2, 3, 7, 5, 26, 12, 33, 47, 15, 126, 22, 43, 10, 25, 26],
}
In [ ]:
dots = Dot(data, values='timing', label='interpreter',
group='sample', title="Dots Example, dict input",
ylabel='Performance', legend='top_left')
show(dots)
In [ ]:
df = pd.DataFrame(data)
dots = Dot(df, values='timing', label='interpreter',
group='sample', title="Dots Example, pandas input",
ylabel='Performance', legend='top_left')
show(dots)
In [ ]: