piel.visual.plot.table#

Functions#

extract_figure_bottom_bbox(axs)

Extracts the bounding box that covers the bottom range of the figure, considering multiple subplots.

create_axes_parameters_table_overlay(fig, axs, ...[, ...])

This function takes in the parameter_list and a figure, axes list, to return a figure and axes with an attached

create_axes_parameters_tables_separate(→ tuple)

Inserts tables between vertical subplots in an existing figure.

Module Contents#

extract_figure_bottom_bbox(axs)[source]#

Extracts the bounding box that covers the bottom range of the figure, considering multiple subplots. Handles both 1D and 2D arrays of axes.

create_axes_parameters_table_overlay(fig, axs: list, parameters_list: list, font_family='Roboto', header_font_weight='bold', cell_font_size=10, cell_font_weight='normal')[source]#

This function takes in the parameter_list and a figure, axes list, to return a figure and axes with an attached parameter table and relevant colors and line styles. The figure must already have the axes plotted and ready to extract the relevant colors, line styles, and parameters from it accordingly.

This function is particularly useful if the parametric sweep is overlaid in multiple lines of the same axes.

create_axes_parameters_tables_separate(fig, axs: list, parameter_tables_list: list, table_height=0.15, spacing=0.01) tuple[source]#

Inserts tables between vertical subplots in an existing figure. Adjusts the subplot positions to create space for the tables.

Parameters: - fig: The figure object containing the subplots. - axs: A list of axes objects corresponding to the subplots. - parameter_tables_list: A list containing the data to display in the tables.

Each element can be a DataFrame, Series, or list of lists.

  • table_height: The height of the tables relative to the figure (default is 0.2).

  • spacing: Space between the subplots and the tables (default is 0.05).

Returns: - fig: The updated figure object. - axs: The updated list of axes objects, including the tables.