How to automatically adjust Bokeh plot size to the screen size of device used

In addition to Kalimantan's answer, you can also use sizing_mode='stretch_both' in case you want the figure to automatically fit within its container window.


Bokeh charts has a responsive attribute. So you should be able to do p = figure(width=700,height=350, responsive=True)

Bokeh 0.12.10 or After As @Alex Pointed out. The responsive parameter was deprecated in Bokeh 0.12.10. Use sizing_mode='fixed' for responsive=False or sizing_mode='scale_width' for responsive=True instead.