reorder the graphs