# HG changeset patch # User Brecht De Man # Date 1433588083 -3600 # Node ID 566fc4fa2bea27a7e1d1d67eae8965757258d638 # Parent a2b30d251f011feecac963149918c5a902cf9586 Scripts: in score plots (individual and boxplot), remove extra marker in legend; automatically save plot. diff -r a2b30d251f01 -r 566fc4fa2bea scripts/score_boxplot.py --- a/scripts/score_boxplot.py Fri Jun 05 13:26:31 2015 +0100 +++ b/scripts/score_boxplot.py Sat Jun 06 11:54:43 2015 +0100 @@ -64,8 +64,7 @@ plt.ylabel('Rating') plt.ylim(0,1) - plt.show() + #plt.show() # show plot #exit() - #TODO Save output automatically - + plt.savefig(rating_folder+page_name+"-ind.png") diff -r a2b30d251f01 -r 566fc4fa2bea scripts/score_individual.py --- a/scripts/score_individual.py Fri Jun 05 13:26:31 2015 +0100 +++ b/scripts/score_individual.py Sat Jun 06 11:54:43 2015 +0100 @@ -9,7 +9,7 @@ markerlist = ["x", ".", "o", "*", "+", "v", ">", "<", "8", "s", "p"] # get every csv file in folder -for file in os.listdir(rating_folder): # You have to put this in folder where rating csv files are. +for file in os.listdir(rating_folder): if file.endswith(".csv"): page_name = file[:-4] # file name (without extension) is page ID @@ -47,13 +47,14 @@ plt.legend(linehandles, legendnames, loc='upper right', - bbox_to_anchor=(1.1, 1), borderaxespad=0.) + bbox_to_anchor=(1.1, 1), + borderaxespad=0., + numpoints=1 # remove extra marker + ) #TODO Put legend outside of box - #TODO Why two markers in legend? - plt.show() + #plt.show() # show plot #exit() - #TODO Save output automatically - + plt.savefig(rating_folder+page_name+"-ind.png")