MCPcopy Create free account
hub / github.com/MAC-VO/MAC-VO / plot_flow_performance

Function plot_flow_performance

Utility/Plot/PlotFigure.py:189–202  ·  view source on GitHub ↗
(flow_results: list[FlowPerformance], file_name: str)

Source from the content-addressed store, hash-verified

187
188
189def 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
205def AnalyzeRTE_cdf(runs: list[tuple[PlotableMotions, PlotableMotions]], axis: Literal[0, 1, 2] | None, file_name: Path):

Callers 1

evaluate_flowFunction · 0.90

Calls 2

plot_histogramFunction · 0.85
closeMethod · 0.80

Tested by

no test coverage detected