41 lines
766 B
Python
41 lines
766 B
Python
import matplotlib.pyplot as plt
|
|
import pandas as pd
|
|
|
|
df = pd.read_csv("measurements.csv")
|
|
|
|
x = df["x"]
|
|
theoretical = df["theoretical"]
|
|
practical = df["practical"]
|
|
|
|
plt.figure(figsize=(10, 6))
|
|
plt.plot(
|
|
x,
|
|
theoretical,
|
|
marker="o",
|
|
linestyle="-",
|
|
linewidth=2,
|
|
markersize=8,
|
|
label="Theoretical",
|
|
color="blue",
|
|
)
|
|
plt.plot(
|
|
x,
|
|
practical,
|
|
marker="s",
|
|
linestyle="--",
|
|
linewidth=2,
|
|
markersize=8,
|
|
label="Practical",
|
|
color="red",
|
|
)
|
|
|
|
plt.xlabel("Processors", fontsize=12, fontweight="bold")
|
|
plt.ylabel("T_p", fontsize=12, fontweight="bold")
|
|
plt.title("Theoretical vs Practical Values", fontsize=14, fontweight="bold")
|
|
plt.legend(fontsize=11)
|
|
plt.grid(True, alpha=0.3)
|
|
plt.xticks(x)
|
|
|
|
plt.tight_layout()
|
|
plt.show()
|