Matlibplot Table Stretching And Moving
Im trying to adjust this table so that it will take up the entire window, but no combination of the top, bottom left and right sliders will allow me to do it, all they do is shrink
Solution 1:
You are creating the table below the axes. It seems you would rather like to create it within the axes,
table = ax.table(..., loc="center")
To then adjust the vertical span, you may set the scale, e.g. to double the size in y direction:
table.scale(1,2)
The result would then look like
Alternatively, specify the bounding box of the table with respect to the axes. To fill the complete axes,
table = ax.table(..., bbox=[0,0,1,1])
Then calling fig.tight_layout()
adjusts the margins as usual.
Solution 2:
Use the zoom tool, and select a region wider than it is tall (e.g., the top left corner to the bottom right) to change the aspect ratio. You may also be able to adjust the figsize
to get a better aspect ratio.
Post a Comment for "Matlibplot Table Stretching And Moving"