set graph to specific size.