git-cal

Faire un calendrier d'activité git avec gnuplot - retour accueil

git clone git://bebou.netlib.re/git-cal
Log | Files | Refs | README |

graph.gp (737B)


      1 #! /usr/bin/gnuplot
      2 
      3 set term pngcairo
      4 width=2000
      5 set term pngcairo size width,(width/(52/7))
      6 
      7 set tmargin 1; set lmargin 6.5; set rmargin 12
      8 
      9 x(nl) = floor(nl/7)
     10 y(nl) = int(nl*-1)%7
     11 
     12 set border 0
     13 unset tics
     14 unset key
     15 
     16 stats 'nbofcommits.tsv' u 1 nooutput
     17 set cbrange [0:STATS_max]
     18 set palette defined ( 0 "#EEEEEE", 1 "light-blue", STATS_max/1.5 "blue", STATS_max "dark-blue" )
     19 set colorbox user \
     20 	origin first 53, first -6 \
     21 	size   first  1, first  6.5 \
     22 	noborder
     23 set cbtics scale 0 nomirror
     24 
     25 set label "Mon" at -1.5, 0
     26 set label "Thu" at -1.5,-3
     27 set label "Sun" at -1.5,-6
     28 
     29 plot 'nbofcommits.tsv' u ($1==-1 ? NaN:x($0)):(y($0)):1 \
     30 					   w p \
     31 					   pt 5 ps 5 lc palette, \
     32 	 '' u (x($0)):($5==1 ? 1:NaN):(strcol(4)) w labels