Grid adaptation

Adapt grid with rulers