diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2012-03-04 16:36:06 -0800 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2012-03-04 16:36:06 -0800 |
| commit | 3dc183008e040aef7c64a4a5ede9557856326e31 (patch) | |
| tree | 2b61e8f8769821180cc9ecc62f024a25a1d10765 /data/pair-matching/roc.py | |
| parent | b14f133b7b8cb5d732ab7a97e6f50cf20dedce9a (diff) | |
| download | kinect-3dc183008e040aef7c64a4a5ede9557856326e31.tar.gz | |
Generate plots at the right size. The size shouldn't be set in the latex code
Diffstat (limited to 'data/pair-matching/roc.py')
| -rwxr-xr-x | data/pair-matching/roc.py | 16 |
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() |
