Bläddra i källkod

Cleanup for *.plot writing.

Heikki Hokkanen 18 år sedan
förälder
incheckning
c4443822ee
1 ändrade filer med 17 tillägg och 8 borttagningar
  1. 17
    8
      statgit

+ 17
- 8
statgit Visa fil

@@ -431,19 +431,28 @@ class HTMLReportCreator(ReportCreator):
431 431
 		# commits_by_year_month
432 432
 		f = open(path + '/commits_by_year_month.plot', 'w')
433 433
 		f.write(GNUPLOT_COMMON)
434
-		f.write('set output \'commits_by_year_month.png\'\n')
435
-		f.write('unset key\n')
436
-		f.write('set xdata time\nset timefmt "%Y-%m"\nset format x "%Y-%m"\n')
437
-		f.write('plot \'commits_by_year_month.dat\' using 1:2:(0.5) w boxes fs solid')
434
+		f.write(
435
+		# TODO rotate xtic labels by 90 degrees
436
+"""
437
+set output 'commits_by_year_month.png'
438
+unset key
439
+set xdata time
440
+set timefmt "%Y-%m"
441
+set format x "%Y-%m"
442
+plot 'commits_by_year_month.dat' using 1:2:(0.5) w boxes fs solid
443
+""")
438 444
 		f.close()
439 445
 
440 446
 		# commits_by_year
441 447
 		f = open(path + '/commits_by_year.plot', 'w')
442 448
 		f.write(GNUPLOT_COMMON)
443
-		f.write('set output \'commits_by_year.png\'\n')
444
-		f.write('unset key\n')
445
-		f.write('set xtics 1\n')
446
-		f.write('plot \'commits_by_year.dat\' using 1:2:(0.5) w boxes fs solid')
449
+		f.write(
450
+"""
451
+set output 'commits_by_year.png'
452
+unset key
453
+set xtics 1
454
+plot 'commits_by_year.dat' using 1:2:(0.5) w boxes fs solid
455
+""")
447 456
 		f.close()
448 457
 
449 458
 		os.chdir(path)