Bokeh Area Plot TypeError 'Ввод табличного словаря должен быть ориентирован на столбцы'
Я новичок в боке. Я пытаюсь построить фигуру с помощью приведенного ниже кода -
source_quantity = dict(
q1=[],
q2=[]
)
areaPlot = Area(source_quantity, title="Area Chart", legend="top_left", xlabel='time', ylabel='Quantity')
Я не понимаю, почему это дает мне следующую трассировку стека -
ERROR:bokeh.application.application:Error running application handler <bokeh.application.handlers.script.ScriptHandler object at 0x10854fbd0>: Input of table-like dict must be column-oriented.
File "data_source.py", line 681, in from_data:
raise TypeError('Input of table-like dict must be column-oriented.') Traceback (most recent call last):
File "//anaconda/lib/python2.7/site-packages/bokeh/application/handlers/code_runner.py", line 71, in run
exec(self._code, module.__dict__)
File "/Users/e22654/workspace/python/BokehDemo/Plot.py", line 70, in <module>
areaPlot = Area(source_quantity, title="Area Chart", legend="top_left", xlabel='time', ylabel='Quantity')
File "//anaconda/lib/python2.7/site-packages/bokeh/charts/builders/area_builder.py", line 69, in Area
return create_and_build(AreaBuilder, data, **kws)
File "//anaconda/lib/python2.7/site-packages/bokeh/charts/builder.py", line 62, in create_and_build
builder = builder_class(*data, **builder_kws)
File "//anaconda/lib/python2.7/site-packages/bokeh/charts/builder.py", line 275, in __init__
data = ChartDataSource.from_data(*args, **data_args)
File "//anaconda/lib/python2.7/site-packages/bokeh/charts/data_source.py", line 681, in from_data
raise TypeError('Input of table-like dict must be column-oriented.')
TypeError: Input of table-like dict must be column-oriented.