In [ ]:
import bokeh
bokeh.load_notebook()
In [ ]:
from collections import OrderedDict
import pandas as pd
import numpy as np
from bokeh.charts import Dot
# create some example data
xyvalues = OrderedDict(
python=[2, 3, 7, 5, 26],
pypy=[12, 33, 47, 15, 126],
jython=[22, 43, 10, 25, 26],
)
dots = Dot(xyvalues, cat=['lists','loops','dicts', 'gen exp', 'exceptions'],
title="Dots Example", ylabel='Performance', notebook=True, legend='top_left')
dots.show()
In [ ]:
import pandas as pd
df = pd.DataFrame(xyvalues)
dots = Dot(df, cat=['lists','loops','dicts', 'gen exp', 'exceptions'],
title="Dots Example", ylabel='Performance', notebook=True, legend='top_left')
dots.show()
In [ ]:
from bokeh.plotting import output_notebook, show
output_notebook()
lxyvalues = list(xyvalues.values())
dots = Dot(lxyvalues, cat=['lists','loops','dicts', 'gen exp', 'exceptions'],
title="Dots Example", ylabel='Performance', notebook=True)
show(dots)
In [ ]: