diff --git a/gitstats b/gitstats index c71b0e4..c51e84a 100755 --- a/gitstats +++ b/gitstats @@ -979,11 +979,21 @@ class HTMLReportCreator(ReportCreator): if len(allauthors) > conf['max_authors']: f.write('
' % conf['max_authors']) + f.write(html_header(2, 'Cumulated Added Lines of Code per Author (log scale)')) + f.write('
')
+ if len(allauthors) > conf['max_authors']:
+ f.write('' % conf['max_authors'])
+
f.write(html_header(2, 'Commits per Author'))
f.write('
')
if len(allauthors) > conf['max_authors']:
f.write('' % conf['max_authors'])
+ f.write(html_header(2, 'Commits per Author (log scale)'))
+ f.write('
')
+ if len(allauthors) > conf['max_authors']:
+ f.write('' % conf['max_authors'])
+
fgl = open(path + '/lines_of_code_by_author.dat', 'w')
fgc = open(path + '/commits_by_author.dat', 'w')
@@ -1309,7 +1319,9 @@ plot 'lines_of_code.dat' using 1:2 w lines
# Lines of Code Added per author
f = open(path + '/lines_of_code_by_author.plot', 'w')
+ g = open(path + '/lines_of_code_by_author_logscale.plot', 'w')
f.write(GNUPLOT_COMMON)
+ g.write(GNUPLOT_COMMON)
f.write(
"""
set terminal png transparent size 640,480
@@ -1324,6 +1336,23 @@ set ylabel "Lines"
set xtics rotate
set bmargin 6
plot """
+)
+ g.write(
+"""
+set terminal png transparent size 640,480
+set output 'lines_of_code_by_author_logscale.png'
+set key left top
+set yrange [0.1:]
+set ytics add("0" 0.1)
+set logscale y
+set xdata time
+set timefmt "%s"
+set format x "%Y-%m-%d"
+set grid y
+set ylabel "Lines"
+set xtics rotate
+set bmargin 6
+plot """
)
i = 1
plots = []
@@ -1332,13 +1361,17 @@ plot """
author = a.replace("\"", "\\\"").replace("`", "")
plots.append("""'lines_of_code_by_author.dat' using 1:%d title "%s" w lines""" % (i, author))
f.write(", ".join(plots))
+ g.write(", ".join(plots))
f.write('\n')
-
+ g.write('\n')
f.close()
+ g.close()
# Commits per author
f = open(path + '/commits_by_author.plot', 'w')
+ g = open(path + '/commits_by_author_logscale.plot', 'w')
f.write(GNUPLOT_COMMON)
+ g.write(GNUPLOT_COMMON)
f.write(
"""
set terminal png transparent size 640,480
@@ -1353,6 +1386,23 @@ set ylabel "Commits"
set xtics rotate
set bmargin 6
plot """
+)
+ g.write(
+"""
+set terminal png transparent size 640,480
+set output 'commits_by_author_logscale.png'
+set key left top
+set yrange [0.1:]
+set ytics add("0" 0.1)
+set logscale y
+set xdata time
+set timefmt "%s"
+set format x "%Y-%m-%d"
+set grid y
+set ylabel "Commits"
+set xtics rotate
+set bmargin 6
+plot """
)
i = 1
plots = []
@@ -1361,9 +1411,11 @@ plot """
author = a.replace("\"", "\\\"").replace("`", "")
plots.append("""'commits_by_author.dat' using 1:%d title "%s" w lines""" % (i, author))
f.write(", ".join(plots))
+ g.write(", ".join(plots))
f.write('\n')
-
+ g.write('\n')
f.close()
+ g.close()
os.chdir(path)
files = glob.glob(path + '/*.plot')