-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraw_PRscatter.py
executable file
·33 lines (30 loc) · 1.14 KB
/
draw_PRscatter.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
30
31
32
33
"""Draw Precision Recall scatter"""
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import os
import pdb
# [Recall, Precision]
Data = np.array([[0.929201491, 0.907628418],
[0.924088956, 0.911424081],
[0.926457434, 0.912477914],
[0.930117407, 0.910079952],
[0.93267417, 0.921156597],
[0.937219876, 0.929767623]])
if __name__ == '__main__':
plt.close('all')
fig = plt.figure()
ax = fig.add_subplot(111)
ax.grid(linestyle='--', alpha=1.0)
ax.scatter(Data[0,0], Data[0,1], s=85, marker='o', c='b') # 75
ax.scatter(Data[1,0], Data[1,1], s=85, marker='d', c='g') # 55
ax.scatter(Data[2,0], Data[2,1], s=85, marker='^') # 55
ax.scatter(Data[3,0], Data[3,1], s=85, marker='v') # 55
ax.scatter(Data[4,0], Data[4,1], s=150, marker='p') # 55
ax.scatter(Data[5,0], Data[5,1], s=150, marker='*', c='r') # 75
plt.ylim(0.905, 0.932)
plt.xlim(0.923, 0.938)
plt.show()
pdb.set_trace()
save_dir = os.path.join('Precition_Recall.png')
plt.savefig(save_dir, dpi=100)