Nonperturbative description of the butterfly diagram of energy spectra for materials immersed in a magnetic field