22
This commit is contained in:
parent
854395b8a1
commit
8c0c87f745
21
lab_3/21_and_22/plot_time.py
Normal file
21
lab_3/21_and_22/plot_time.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user