title: Gnuplot: Plotting trajectories of multiple objects from one data file
body: <p>I have a program that outputs the position of each particle from a many particle system. The output data is such that each row is a subsequent time step, and the columns have the position (and velocity)</p>
  
  <p>Eg.</p>
  
  <pre><code>    t=1 x1 y1 vx1 vy1 x2 y2 vx2 vy2 ...etc
      t=2 x1 y1 vx1 vy1 x2 y2 vx2 vy2 ...etc
      ...etc
  </code></pre>
  
  <p>When I had a few particles I could plot each trajectory using commands of the following form</p>
  
  <pre><code>    plot "output.dat" u 2:3 w lines, "output.txt" u 6:7 w lines, ...etc
  </code></pre>
  
  <p>However, I now have almost 100 particles. How can I set up a script to plot the trajectory of each particle, knowing that the column for xi is 2+4*i and yi is 3+4*i?</p>