Browse Source

Cleanup for *.plot writing.

Heikki Hokkanen 18 years ago
parent
commit
c4443822ee
1 changed files with 17 additions and 8 deletions
  1. 17
    8
      statgit

+ 17
- 8
statgit View File

431
 		# commits_by_year_month
431
 		# commits_by_year_month
432
 		f = open(path + '/commits_by_year_month.plot', 'w')
432
 		f = open(path + '/commits_by_year_month.plot', 'w')
433
 		f.write(GNUPLOT_COMMON)
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
 		f.close()
444
 		f.close()
439
 
445
 
440
 		# commits_by_year
446
 		# commits_by_year
441
 		f = open(path + '/commits_by_year.plot', 'w')
447
 		f = open(path + '/commits_by_year.plot', 'w')
442
 		f.write(GNUPLOT_COMMON)
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
 		f.close()
456
 		f.close()
448
 
457
 
449
 		os.chdir(path)
458
 		os.chdir(path)