✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

How to remove white space under table

Hi All,

I am creating a table with plotly. There seems to be a large white space around it that I’m unable to remove.
I’ve tried layout, which indeed configures the position and dimensions of the table within the white space, but does not reduce the white space itself. Can anyone assist? I am a new user, so do knot assume to much knowledge.

Any help is very much appreciated.

Hi @Mark1 welcome to the forum! I tried your code but I don’t understand what you get: with a height of 10 the table cannot be seen at all. The main parameter to change here is the height because it sets the height of the figure, if you don’t have the right height you will always have either white space or not enough space for the table.


Could there be a css configuration adding white space to the jupyter cell? You can check this by right-clicking on “Inspect element” in your browser and seeing how much height the plotly figure takes, like in the screenshot below

1 Like

Hi Emmanuelle,

Thanks for your reply. The height setting indeed did the trick. I was apparently a bit confused by the" t" and “b” parameters. I figured the white space must come from those and the height just sets the size of the table and not the white space. Learned something, thanks.

Mark