Limiting the number of lines on a graph?