glBegin(GL_LINE_STRIP); for (i=0; i<data.size()-1; i+= skip ){ glVertex2f(data[i][0],data[i][1]); } glVertex2f(data[i][0],data[i][1]); glEnd();