(plot_dir: str, data_frame: pd.DataFrame, title: str, slug: str)
| 4434 | |
| 4435 | |
| 4436 | def save_plot(plot_dir: str, data_frame: pd.DataFrame, title: str, slug: str): |
| 4437 | all_files = [] |
| 4438 | |
| 4439 | base_file_name = os.path.join(plot_dir, slug) |
| 4440 | file_path = f"{base_file_name}.svg" |
| 4441 | plt.savefig(MZ_ROOT / file_path, bbox_inches="tight") |
| 4442 | all_files.append(file_path) |
| 4443 | file_path = f"{base_file_name}.html" |
| 4444 | data_frame.to_html(MZ_ROOT / file_path) |
| 4445 | all_files.append(file_path) |
| 4446 | print(f"+++ Plot for {title}") |
| 4447 | print(data_frame.to_string()) |
| 4448 | |
| 4449 | upload_file(all_files, title) |
| 4450 | |
| 4451 | |
| 4452 | def upload_file( |
no test coverage detected