The spatial distribution of magnetostatic wave modes has been measured in a thin YIG slab using Brillouin light scattering. A conventional microwave setup was used to excite the resonance modes while the sample position was scanned in the laser beam. The spatial distribution of the modes shows a central confinement of the uniform mode and an effective pinning of the rf magnetization at the two ends of the slab.