我有一个GlyphRenderer
,其数据_源数据是
{'index': [0, 1, 2, 3, 4, 5, 6, 7],
'color': ['#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#fee08b', '#fdae61', '#f46d43', '#d53e4f']}
渲染器的图示符是
^{pr2}$渲染时,我看到了
E-1001 (BAD_COLUMN_NAME): Glyph refers to nonexistent column name: color [renderer: GlyphRenderer(id='1d1031f5-6ee3-4744-a0f7-22309798e313', ...)]
我显然遗漏了一些东西,但这几乎是从公开的例子中提取出来的。为什么cd4{cd2>中的数据不显示在cd4}中。在
完整的源代码可从https://pastebin.com/HXAEEujP获得
通常,在构造一个对象时提供所有相关的参数,而不是在对象已经创建之后对其进行变异。对于Bokeh来说尤其如此——在许多情况下,它根据传递给
__init__
的参数做一些额外的工作。在请看一下您的代码版本:
相关问题 更多 >
编程相关推荐