p = 0.0;
n=0;
for k = 1:length( spikes )
    %a= 0.5*(spikes(k+1)+spikes(k)); 
    %fprintf( 'set label %d "$T_{%d}$" at %g, -0.5 center\n', k+2, k, a );
    %fprintf( 'set arrow %d from %g, 0.3 to %g, 0.3 heads\n', k+2, spikes(k), spikes(k+1) );
    %fprintf( '%g %d\n%g %d\n\n', p, n, spikes(k), n );
    fprintf( '%g %d\n', spikes(k), n+1 );
    n = n+1;
    p = spikes(k);
end
