scaling of grid and graph