generate grid box with axis attribute