From d7b0798050f72f08bcb3995c465efeb9bf9f516d Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Sun, 4 Mar 2012 13:01:08 -0800 Subject: Set font size, figsize, and bounding box of plots Started taking Brano's comments into account (section 3) --- data/pair-matching/roc.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'data/pair-matching/roc.py') diff --git a/data/pair-matching/roc.py b/data/pair-matching/roc.py index c121e97..19a1acf 100755 --- a/data/pair-matching/roc.py +++ b/data/pair-matching/roc.py @@ -2,9 +2,16 @@ import sys import numpy as np import matplotlib.pyplot as plt +import matplotlib as mpl import math from sets import ImmutableSet +mpl.rcParams['font.size'] = 8 +mpl.rcParams['lines.linewidth'] = 0.5 +mpl.rcParams['figure.figsize'] = 6,5 +mpl.rcParams['legend.fontsize'] = 8 +mpl.rcParams['axes.linewidth'] = 0.8 + def distance(a,b): return math.sqrt(np.square(a-b).sum()) @@ -68,7 +75,7 @@ if __name__ == "__main__": true_pos = true_pos[indices] plt.plot(false_pos,true_pos,label="$\sigma$ = "+str(s)) plt.legend(loc="lower right") - plt.savefig("roc.pdf") + plt.savefig("roc.pdf",bbox_inches="tight",pad_inches=0.05) plt.show() -- cgit v1.2.3-70-g09d2