def __init__(self, names, initial_size, width=900, height=480):
# Call this once to raise an error early if necessary:
self._colors = colors.colors(len(names))
self._start = time.perf_counter()
self._initial_size = initial_size
self._sources = collections.OrderedDict([
(name, {
'hist': bm.ColumnDataSource(
data={'top': [], 'left': [], 'right': []}),
'pdf': bm.ColumnDataSource(
data={'x': [], 'y': []}),
'stddev': bm.ColumnDataSource(
data={'base': [], 'lower': [], 'upper': []}),
'median': bm.ColumnDataSource(
data={'x': [], 'y': []})
})
for name in names
])
self._width = width
self._height = height
self._plot = None
self._elapsed_rendering_seconds = 0.0
self._describe_widget = ipdisplay.HTML('')
评论列表
文章目录