(flow_results: list[FlowPerformance], file_name: str)
| 187 | |
| 188 | |
| 189 | def plot_flow_performance(flow_results: list[FlowPerformance], file_name: str): |
| 190 | GRID_SHAPE = (1, 2) |
| 191 | _ = plt.figure(figsize=(16, 6), dpi=300) |
| 192 | |
| 193 | fields = ["masked_epe", "epe"] |
| 194 | for i, field in enumerate(fields): |
| 195 | row: list[float] = [getattr(res, field) for res in flow_results] |
| 196 | ax = plt.subplot2grid(GRID_SHAPE, (i // 2, i % 2), rowspan=1, colspan=1) |
| 197 | ax.set_title(f"Distribution {field}", loc="left") |
| 198 | plot_histogram(row, bins=('width', 2.))(ax) |
| 199 | |
| 200 | plt.tight_layout() |
| 201 | plt.savefig(str(file_name)) |
| 202 | plt.close() |
| 203 | |
| 204 | |
| 205 | def AnalyzeRTE_cdf(runs: list[tuple[PlotableMotions, PlotableMotions]], axis: Literal[0, 1, 2] | None, file_name: Path): |
no test coverage detected