Plot 博克区绘图类型错误';像dict这样的表的输入必须是面向列的';

Plot 博克区绘图类型错误';像dict这样的表的输入必须是面向列的';,plot,charts,typeerror,bokeh,Plot,Charts,Typeerror,Bokeh,我是博克的新手。我正在用下面的代码绘制一个面积图- 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

我是博克的新手。我正在用下面的代码绘制一个面积图-

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.
ERROR:bokeh.application.application:ERROR运行应用程序处理程序:像dict这样的表的输入必须是面向列的。
文件“data_source.py”,第681行,在from_data中:
raise TypeError('像dict这样的表的输入必须是面向列的。')回溯(最近一次调用last):
文件“//anaconda/lib/python2.7/site packages/bokeh/application/handlers/code_runner.py”,第71行,运行中
exec(自我代码、模块指令)
文件“/Users/e22654/workspace/python/BokehDemo/Plot.py”,第70行,在
areaPlot=面积(源数量,title=“面积图”,legend=“左上方”,xlabel='time',ylabel='quantity')
文件“//anaconda/lib/python2.7/site packages/bokeh/charts/builders/area_builder.py”,第69行,区域中
返回创建和构建(AreaBuilder,数据,**kws)
文件“//anaconda/lib/python2.7/site packages/bokeh/charts/builder.py”,第62行,在create_和_build中
生成器=生成器类(*数据,**生成器类)
文件“//anaconda/lib/python2.7/site packages/bokeh/charts/builder.py”,第275行,在__
data=ChartDataSource.from_data(*args,**data_args)
文件“//anaconda/lib/python2.7/site packages/bokeh/charts/data_source.py”,第681行,from_data
raise TypeError('像dict这样的表的输入必须是面向列的')
TypeError:像dict这样的表的输入必须是面向列的。

似乎是源数量中的空序列导致了异常。这确实有效!我真傻!非常感谢。