Calculating SNR from Frequency Domain
If it is a sinusoidal signal, there will be peak (among the frequency bins) in the frequency spectrum corresponding to the tone's frequency.

Ratio of the magnitude of this peak to the sum of the magnitudes of all other bins (which are noise) correspond to Signal to Noise Ratio.

But when its a non sinusoidal signal (like the one in your plot) you have to consider the relevant band of the signal instead of a single peak. you can quantify it by specifying a frequency bin corresponding to the mojor frquency component in the signal plus some leakage (related to bandwidth) into the nearby bins.

Please take a look in the following matlab code.

N               = 8192; % FFT length
leak            = 50; 
% considering a leakage of signal energy to 50 bins on either side of major freq component

fft_s           = fft(inptSignal,N); % analysing freq spectrum
abs_fft_s       = abs(fft_s);

[~,p]           = max(abs_fft_s(1:N/2));
% Finding the peak in the freq spectrum

sigpos          = [p-leak:p+leak N-p-leak:N-p+leak];
% finding the bins corresponding to the signal around the major peak
% including leakage

sig_pow         = sum(abs_fft_s(sigpos)); % signal power = sum of magnitudes of bins conrresponding to signal
abs_fft_s([sigpos]) = 0; % making all bins corresponding to signal zero:==&gt; what ever that remains is noise 
noise_pow       = sum(abs_fft_s); % sum of rest of componenents == noise power

SNR             = 10*log10(sig_pow/noise_pow);