update graph size