tabensemb.utils.utils.get_figsize#

tabensemb.utils.utils.get_figsize(n, max_col, width_per_item, height_per_item, max_width)[source]#

Calculate the figsize argument of matplotlib for a figure with subplots.

Parameters:
n

The number of subplots.

max_col

The maximum number of columns.

width_per_item

The width of each column if only one row is needed.

height_per_item

The height of each row.

max_width

The width of the figure if multiple rows are needed.

Returns:
tuple

The figsize argument of matplotlib

int

The number of columns of the figure

int

The number of rows of the figure