我想更改散景图的 x 轴。
xrange = ["Marseille", "Lyon"]
plot = figure(x_range=xrange)
plotSource = ColumnDataSource(data=dict(x=xrange, y=[1, 2]))
bars = VBar(x="x", top="y", width=0.1, fill_color="black")
plot.add_glyph(plotSource, bars)
handler = show(plot, notebook_handle=True)
plot.x_range = ["Marseille", "Paris"] # how can i do that
push_notebook(handle=handler)
ValueError: expected an instance of type Range, got ['Marseille', 'Paris'] of type list
我无法从列表中创建范围,我该怎么办?
PIPIONE
相关分类