Black Lives Matter. Please consider donating to Black Girls Code today.

Reduce Space between Graphs

Hi, how can I reduce the space between graphs? It cosumes space on my dashboard display.


My first guesses would be:

  • define a custom CSS file with a thin margin between the two containers
  • reduce a bit the left & right margins in your figures

Good luck

Like Batalex said, it probably comes from the margin in your figures’ layout. To reduce define these margins use the following:

layout = go.Layout(
        t=30, # top margin: 30px, you want to leave around 30 pixels to
              # display the modebar above the graph.
        b=10, # bottom margin: 10px
        l=10, # left margin: 10px
        r=10, # right margin: 10px
    # Some more layout options

It works! Thank you so much! :star_struck:

Alright, understood. Thank you! :star_struck: