Make Bokeh Plot Fill the Entire Screen

Make Bokeh Plot Fill the Entire Screen

I am using bokeh to plot a google map and I can set the size manually as follows:

self.plot = gmap(self.api_key, self.map_options, title=title)
self.plot.width = 800
self.plot.height = 300
show(self.plot)

This works fine but is there a way to ask it to fill the browser with the map i.e. some sort of a full screen like mode?

1 Answer

Ok, I figured t out. Posting it as an answer in case it helps someone. Use gridplot

So something like:

layout = gridplot([[self.plot]], sizing_mode='stretch_both')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.