How to measure algorithmically side lobes in real data
Zero pad your FFT (append zeros) such that you get more samples of the Discrete Time Fourier Transform (DTFT). The DTFT would give you the sidelobes and roll-off that you want to see (specifically for your diagram you would zero pad an input that is all ones, or an input that is any constant value).