Graph printing optimization