To get a spectrum like this, you need an experimental set-up with a generator of microwaves. The externally applied magnetic field is tuned and the microwaves stay the same frequency. You then search for the magnetic field that gives you the EPR transitions. This is then done for several angles over which you turn your sample. From the magnetic field strength and the resonance peak you see, you can then calculate the g-factor.