From 1a51d24df5942248c77adcba86f63b5f4481087f Mon Sep 17 00:00:00 2001 From: Heikki Hokkanen Date: Tue, 7 Aug 2007 18:29:38 +0300 Subject: [PATCH] Graph: Day of Week. --- statgit | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/statgit b/statgit index b7a7936..313f8c5 100755 --- a/statgit +++ b/statgit @@ -323,6 +323,7 @@ class HTMLReportCreator(ReportCreator): f.write('0') f.write('') f.write('') + f.write('') fp.close() # Commits by year/month @@ -445,10 +446,25 @@ set output 'hour_of_day.png' unset key set xrange [0.5:24.5] set xtics 4 +set ylabel "Commits" plot 'hour_of_day.dat' using 1:2:(0.5) w boxes fs solid """) f.close() + # day of week + f = open(path + '/day_of_week.plot', 'w') + f.write(GNUPLOT_COMMON) + f.write( +""" +set output 'day_of_week.png' +unset key +set xrange [0.5:7.5] +set xtics 1 +set ylabel "Commits" +plot 'day_of_week.dat' using 1:2:(0.5) w boxes fs solid +""") + f.close() + # commits_by_year_month f = open(path + '/commits_by_year_month.plot', 'w') f.write(GNUPLOT_COMMON) @@ -460,6 +476,8 @@ unset key set xdata time set timefmt "%Y-%m" set format x "%Y-%m" +set xtics 15768000 +set ylabel "Commits" plot 'commits_by_year_month.dat' using 1:2:(0.5) w boxes fs solid """) f.close() @@ -472,12 +490,13 @@ plot 'commits_by_year_month.dat' using 1:2:(0.5) w boxes fs solid set output 'commits_by_year.png' unset key set xtics 1 +set ylabel "Commits" plot 'commits_by_year.dat' using 1:2:(0.5) w boxes fs solid """) f.close() os.chdir(path) - for i in ('hour_of_day', 'commits_by_year_month', 'commits_by_year'): + for i in ('hour_of_day', 'day_of_week', 'commits_by_year_month', 'commits_by_year'): os.system('gnuplot %s.plot' % i) pass -- 2.11.4.GIT