☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Change colorbar visible attribute without resizing the plot

Community Support
rocheseb
rocheseb

Now If I have a figure with a colorbar and set the visible attribute of the colorbar to False, the figure stretches to fill the space taken by the colorbar.
Is it possible to keep the figure dimensions fixed when the colorbar visible attribute changes?

⌁   Link to post
Bryan
Bryan

There’s no exact way to know these dimensions from Python since the actual layout only occurs in the browser, and can be subtly affected by available fonts, different browsers, etc. You can guesstimate the width and then set e.g. plot.min_border_right to be some value larger than that, to make sure the space reserved on the side of the plot where you put the colorbar is always at least a minimum amount.

⌁   Link to post

End of archived discussion · Replies are disabled