diff scripts/score_plot.py @ 1067:8d0061336b90

Scripts: timeline with rectangles (accurate start and end, customisable width); timeline and score plots to PDF by default.
author Brecht De Man <BrechtDeMan@users.noreply.github.com>
date Tue, 11 Aug 2015 11:06:55 +0200
parents a2a245542ae6
children 2ea78697aadf
line wrap: on
line diff
--- a/scripts/score_plot.py	Tue Aug 11 10:15:17 2015 +0200
+++ b/scripts/score_plot.py	Tue Aug 11 11:06:55 2015 +0200
@@ -85,11 +85,10 @@
             else: 
                 print "WARNING: The confidence value needs to be between 0 and 1"
         
-         # FOLDER NAME
-         else: 
-            # assume it's the folder name
-            rating_folder = arg
-            #TODO try it exists, otherwise show exception
+        # FOLDER NAME
+        else: 
+             # assume it's the folder name
+             rating_folder = arg
 
 # at least one plot type should be selected: box plot by default
 if not enable_boxplot and not enable_confidence and not enable_individual:
@@ -230,5 +229,5 @@
         plot_type = ("-box" if enable_boxplot else "") + \
                     ("-conf" if enable_confidence else "") + \
                     ("-ind" if enable_individual else "")
-        plt.savefig(rating_folder+page_name+plot_type+".png")
+        plt.savefig(rating_folder+page_name+plot_type+".pdf", bbox_inches='tight')
         plt.close()