sunpeek.common.plot_utils.add_table#
- sunpeek.common.plot_utils.add_table(ax, df, col_formats=None, divider_lines=None, hpad=2, vpad=1, vpad_header=2, vpad_lines=0, cell_vspace=1.9, cell_vspace_header=2.5, header_facecolor=Colors.pale_grey)#
Create matplotlib table using only standard components (text, plot etc.). Column formats can be adapted via TableColumns class. Passed axes is reduced to necessary height and is returned, so it can be used to place subsequent artists. Inspired by: https://www.sonofacorner.com/beautiful-tables/ Returns number of rendered rows of df (might not be all if there is not enough space on the page).
- Return type: