The formation of a Bose—Einstein condensate of magnons in a perpendicularly magnetized iron yttrium garnet film under radio-frequency pumping in a stripline has been studied experimentally. The characteristics of the nonlinear magnetic resonance and spatial distribution of the Bose—Einstein condensate of magnons in the gradient of a magnetic field have been analyzed. In these experiments, the system of bosonic magnons behaves in much the same way as the Bose—Einstein condensate of magnons in antiferromagnetic superfluid 3He-B, which was previously studied in detail. The Bose—Einstein condensate of magnons forms a coherently precessing state having the properties of magnon superfluidity. Its stability is determined by the repulsion potential between excited magnons, which compensates the inhomogeneity of the magnetic field.