From c4443822ee5ce8b78528ab9d01a3f5d511725717 Mon Sep 17 00:00:00 2001 From: Heikki Hokkanen Date: Tue, 7 Aug 2007 15:58:34 +0300 Subject: [PATCH] Cleanup for *.plot writing. --- statgit | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/statgit b/statgit index 655e90f..c60776e 100755 --- a/statgit +++ b/statgit @@ -431,19 +431,28 @@ class HTMLReportCreator(ReportCreator): # commits_by_year_month f = open(path + '/commits_by_year_month.plot', 'w') f.write(GNUPLOT_COMMON) - f.write('set output \'commits_by_year_month.png\'\n') - f.write('unset key\n') - f.write('set xdata time\nset timefmt "%Y-%m"\nset format x "%Y-%m"\n') - f.write('plot \'commits_by_year_month.dat\' using 1:2:(0.5) w boxes fs solid') + f.write( + # TODO rotate xtic labels by 90 degrees +""" +set output 'commits_by_year_month.png' +unset key +set xdata time +set timefmt "%Y-%m" +set format x "%Y-%m" +plot 'commits_by_year_month.dat' using 1:2:(0.5) w boxes fs solid +""") f.close() # commits_by_year f = open(path + '/commits_by_year.plot', 'w') f.write(GNUPLOT_COMMON) - f.write('set output \'commits_by_year.png\'\n') - f.write('unset key\n') - f.write('set xtics 1\n') - f.write('plot \'commits_by_year.dat\' using 1:2:(0.5) w boxes fs solid') + f.write( +""" +set output 'commits_by_year.png' +unset key +set xtics 1 +plot 'commits_by_year.dat' using 1:2:(0.5) w boxes fs solid +""") f.close() os.chdir(path) -- 2.11.4.GIT