# HG changeset patch # User Brecht De Man # Date 1433588083 -3600 # Node ID a90495a060de4166fe5bf56b0166deddc74e48ba # Parent 75302b775a4d0a37731b0da5e497b6f7586065ac Scripts: in score plots (individual and boxplot), remove extra marker in legend; automatically save plot. diff -r 75302b775a4d -r a90495a060de 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 75302b775a4d -r a90495a060de 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")