layouts ======= .. py:module:: layouts Attributes ---------- .. autoapisummary:: layouts.PRESET_SHAPES Functions --------- .. autoapisummary:: layouts.rows_cols Module Contents --------------- .. py:data:: PRESET_SHAPES .. py:function:: rows_cols(num_subplots, rows=None, columns=None, max_columns=8) Calculate the number of rows and columns for a figure with the given number of subplots. :param num_subplots: The number of subplots to be plotted. :type num_subplots: int :param rows: The number of rows in the figure. If not provided, it will be calculated based on the number of columns and the number of subplots. :type rows: int, optional :param columns: The number of columns in the figure. If not provided, it will be calculated based on the number of rows and the number of subplots. :type columns: int, optional :param max_columns: The maximum number of columns in the figure. Default is 8. :type max_columns: int, optional