Plotting the spectrum as given in the image