summaryrefslogtreecommitdiffstats
path: root/data/pair-matching/roc.py
diff options
context:
space:
mode:
Diffstat (limited to 'data/pair-matching/roc.py')
-rwxr-xr-xdata/pair-matching/roc.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/data/pair-matching/roc.py b/data/pair-matching/roc.py
index 19a1acf..7396ab4 100755
--- a/data/pair-matching/roc.py
+++ b/data/pair-matching/roc.py
@@ -6,11 +6,14 @@ import matplotlib as mpl
import math
from sets import ImmutableSet
-mpl.rcParams['font.size'] = 8
+mpl.rcParams['font.size'] = 5
mpl.rcParams['lines.linewidth'] = 0.5
-mpl.rcParams['figure.figsize'] = 6,5
-mpl.rcParams['legend.fontsize'] = 8
-mpl.rcParams['axes.linewidth'] = 0.8
+mpl.rcParams['figure.figsize'] = 2.2,2.2
+mpl.rcParams['legend.fontsize'] = 5
+mpl.rcParams['axes.linewidth'] = 0.5
+mpl.rcParams['figure.subplot.hspace'] = 0.4
+mpl.rcParams['figure.subplot.wspace'] = 0.4
+legend_width = 0.2
def distance(a,b):
return math.sqrt(np.square(a-b).sum())
@@ -43,6 +46,7 @@ def gen_pairs(var,sk_data):
return result
if __name__ == "__main__":
+ plt.figure(figsize=(3,2.2))
ap = np.loadtxt("associatepredict.txt",delimiter=",")
indices = [i for i in range(ap.shape[0]) if ap[i,1]<0.1]
ap_false = ap[:,1][indices]
@@ -74,9 +78,9 @@ if __name__ == "__main__":
true_pos = np.array(true_pos)
true_pos = true_pos[indices]
plt.plot(false_pos,true_pos,label="$\sigma$ = "+str(s))
- plt.legend(loc="lower right")
+ leg = plt.legend(loc="lower right")
+ leg.get_frame().set_linewidth(legend_width)
plt.savefig("roc.pdf",bbox_inches="tight",pad_inches=0.05)
- plt.show()