-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path00.py
29 lines (25 loc) · 1.98 KB
/
00.py
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
import matplotlib.pyplot as plt
allX = [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, 39, 40, 41, 42,
43, 44, 45, 47, 48, 49, 50, 51, 52, 54, 55, 57, 58, 60, 62, 63, 64, 65, 66, 67, 70, 71, 74, 77, 79, 80, 83, 84, 86, 87, 89, 91, 96, 97, 99, 106, 108, 110, 116, 123]
allY = [117, 131, 141, 93, 101, 62, 72, 53, 40, 40, 39, 37, 34, 33, 25, 28, 26, 17, 17, 15, 10, 13, 10, 15, 15, 16, 10, 10, 9, 6, 6, 14, 7, 6, 4,
10, 9, 9, 3, 5, 4, 5, 1, 2, 4, 2, 5, 1, 3, 3, 1, 2, 5, 1, 2, 3, 1, 3, 1, 1, 2, 2, 3, 3, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1]
stuX = [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, 36, 40, 42, 45, 48, 50, 51, 55, 66, 84]
stuY = [34, 52, 64, 42, 43, 23, 26, 18, 17, 11, 9, 10, 8, 14, 9, 9, 5, 3, 3,
4, 5, 4, 4, 4, 5, 1, 1, 4, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2]
adsX = [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, 39, 40, 41,
42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 54, 55, 57, 58, 60, 62, 63, 64, 65, 66, 67, 70, 71, 74, 77, 79, 80, 83, 84, 86, 87, 89, 91, 96, 97, 106, 108, 110, 116, 123]
adsY = [40, 52, 66, 41, 54, 37, 44, 37, 19, 30, 27, 23, 23, 18, 16, 23, 21, 14, 14, 15, 9, 11, 8, 10, 14, 16, 10, 8, 8, 5, 6, 13, 7, 5, 4,
9, 9, 8, 3, 5, 4, 4, 1, 2, 3, 2, 4, 1, 3, 3, 1, 2, 4, 1, 2, 3, 1, 3, 1, 1, 2, 2, 3, 3, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1]
# 总体度的分布
plt.figure()
plt.plot(allX, allY, label="总体度的分布", linestyle=":")
# advisee度的折线图分布
plt.plot(stuX, stuY, label="advisee度的分布", linestyle="--")
# advisor度的折线图分布
plt.plot(adsX, adsY, label="advisor度的分布", linestyle="-.")
plt.legend()
plt.title("度的分布折线图")
plt.xlabel("度数")
plt.ylabel("频次")
plt.show()