First plot script

This commit is contained in:
2024-02-26 19:19:14 +01:00
committed by Derek Christ
parent 2212a03ae4
commit da29aa865b
4 changed files with 80 additions and 15 deletions

35
pim_plots.py Normal file
View File

@@ -0,0 +1,35 @@
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
df = pd.read_csv("pim_results.csv")
frequency_filter = df["frequency"] == "3GHz"
workloads = df["workload"].unique()
fig, ax = plt.subplots()
width = 0.25
index = 0
# for workload in workloads:
for level in df["level"].unique():
level_filter = df["level"] == level
for pim in [False, True]:
workload_filter = df["workload"] == "vadd"
filtered_df = df[level_filter & workload_filter & frequency_filter]
print(filtered_df)
x = np.arange(len(filtered_df))
offset = 6*width * index
print(x+offset)
bars = ax.bar(x + offset, "ticks", width, data=filtered_df, label=level)
# ax.bar_label(bars, padding=2)
index += 1
ax.legend(loc="upper left")
plt.show()