This commit is contained in:
Trygve 2024-03-14 11:23:10 +01:00
parent 854395b8a1
commit 8c0c87f745
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
import numpy as np
import pandas as pd
f = open('time.csv', 'r')
y = []
for l in f.readlines():
y.append(float(l))
x = range(0, len(y))
plt.plot(x, y, label = 'time (s)')
plt.title('Time to run with k queens')
plt.xlabel('k')
plt.ylabel('time (s)')
plt.rcParams['axes.autolimit_mode'] = 'round_numbers'
plt.grid()
plt.legend()
plt.show()