set horizontal and vertical grid spacing