pe.logger.matplotlib_pdf module
- class pe.logger.matplotlib_pdf.MatplotlibPDF(output_folder, path_separator='-', iteration_format='09d')[source]
Bases:
Logger
The logger that saves Matplotlib figures to PDF files.
- __init__(output_folder, path_separator='-', iteration_format='09d')[source]
Constructor.
- Parameters:
output_folder (str) – The output folder that will be used to save the PDF files
path_separator (str, optional) – The string that will be used to replace ‘’ and ‘/’ in log names, defaults to “-”
iteration_format (str, optional) – The format of the iteration number, defaults to “09d”
- _get_pdf_path(iteration, item)[source]
Get the PDF save path.
- Parameters:
iteration (int) – The PE iteration number
item (
pe.metric_item.MatplotlibMetricItem
) – The Matplotlib figure metric item
- Returns:
The PDF save path
- Return type:
str
- log(iteration, metric_items)[source]
Log the Matplotlib figures to PDF files.
- Parameters:
iteration (int) – The PE iteration number
metric_items (list[
pe.metric_item.MatplotlibMetricItem
]) – The Matplotlib figures to log