Search code examples
pythonbokeh

Remove all padding from Bokeh Plot


How can I remove all whitespace surrounding a Bokeh plot?

I use the Bokeh plotting interface to produce the following image with progressbars for my project:

enter image description here

From various other stack overflow questions I can figure out how to turn off the grid lines, the tick marks, the labels. However I haven't yet figured out how to cleanly remove all horizontal and vertical padding.

What is a comprehensive what to remove all visual elements and padding from the canvas other than what I explicitly add?


Solution

  • It appears that one is meant to set the minimum border attributes on the figure:

    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