-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_queue.py
More file actions
executable file
·38 lines (31 loc) · 927 Bytes
/
plot_queue.py
File metadata and controls
executable file
·38 lines (31 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
#mpl.rcParams["font.family"] = "serif"
#mpl.rcParams["font.size"] = 32
fname1 = "flc2_prob.log"
fname2 = "queuesize.log"
s = 0
prob = np.loadtxt(fname1, skiprows=s)
time1 = prob[:, 0]
pr = prob[:, 1]
queue = np.loadtxt(fname2, skiprows=s)
time2 = queue[:, 0]
qs = queue[:, 1]
plt.figure(1)
#errorbar(rate, qmean, yerr=std, fmt="o")
plt.plot(time1, pr, "k-")
#title(u"Средняя длина очереди")
plt.xlabel(u"Время, с")
plt.ylabel(u"Вероятность")
plt.savefig("dprob_bw_s.png")
plt.figure(2)
#errorbar(rate, qmean, yerr=std, fmt="o")
plt.plot(time2, qs, "k-")
#title(u"Средне-квадратичное отклонение (СКО)")
plt.xlabel(u"Время, с")
plt.ylabel(u"Размер очереди, пакеты")
plt.savefig("qsize_bw_s.png")
#plt.show()