我正在尝试在 Bokeh 中构建条形图,我的数据源 (df_fac) 如下所示:
到目前为止我的代码:
# source
source2 = ColumnDataSource(df_fac)
# Bar chart
bar = figure(plot_width=600, plot_height=600,
x_axis_label='Faculty',
y_axis_label='Number of invoice processed & paid',
tools=['save', 'reset'])
bar.vbar(x='FACULTY', bottom=0, top='PAPER', width=50, color='STEELBLUE', source=source2)
reset_output()
show(bar)
但是我的输出是这样的:
我的 Bokeh 版本是 0.12.7。我尝试在 Chrome 和 IE 中查看输出,但没有成功。提前致谢。
最佳答案
如果您的绘图类别需要在图中引用(x_range(类别列表,...)
关于python - Bokeh 条形图无法正确显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46386985/