MCPcopy Create free account
hub / github.com/COLA-Laboratory/TransOPT / plot_all

Function plot_all

demo/comparison/plot_samples_dbms.py:84–97  ·  view source on GitHub ↗
(workload)

Source from the content-addressed store, hash-verified

82
83
84def plot_all(workload):
85 df = load_data(workload)
86 df_normalized = (df - df.min()) / (df.max() - df.min())
87
88 plt.figure()
89 plt.title(f"All samples for {workload}")
90 plt.xlabel(objectives[0])
91 plt.ylabel(objectives[1])
92 plt.scatter(df_normalized[objectives[0]], df_normalized[objectives[1]], c='b', marker='o')
93
94 # Save the plot as a file
95 file_path = package_path / "demo" / "comparison" / "pngs" / f"dbms_all_{workload}.png"
96 plt.savefig(file_path)
97 plt.close() # Close the plot to free memory
98
99if __name__ == "__main__":
100 workloads_dbms = [

Callers 1

Calls 2

closeMethod · 0.80
load_dataFunction · 0.70

Tested by

no test coverage detected