看起来需要在图像上设置最小边框属性:
fig.min_border_left = 0
fig.min_border_right = 0
fig.min_border_top = 0
fig.min_border_bottom = 0
http://docs.bokeh.org/en/latest/docs/user_guide/styling.html#border
在使用图像URL制作图形时,我遇到了这个问题,花费了很多时间。在深入研究bokeh文档后,我发现控制图形尺寸和绘图的最佳选项是使用frame_width和frame_height以及绘图宽度和高度的组合。
p = figure(plot_width=640, plot_height=180, frame_width=650, tools='', x_axis_location = None, y_axis_location = None)
这样我就可以精确地控制尺寸,从现在开始处理起来将会非常容易,如果有人遇到同样的问题,而bokeh向导的解决方案无法满足您的目标。