function work = percentSpinDiffErrorPlot(sigmaData, user, work)

if user.spinDiffSim == 1

collectedPercentErrors = [];

indCount = 1;

if user.singleMixTime == 0

for j = 1:length(sigmaData)
    if ~isempty(sigmaData(j).corrFactorij) && abs(sigmaData(j).buildups.rawIzero) ~= 999
        collectedPercentErrors(j)           = abs(1 - sigmaData(j).corrFactorij) * 100;
    else
        collectedPercentErrors(j)           = 0;
    end    
end

elseif user.singleMixTime == 1
    
for j = 1:length(sigmaData)
    if ~isempty(sigmaData(j).corrFactorij)
        collectedPercentErrors(j)           = abs(1 - sigmaData(j).corrFactorij) * 100;
    else
        collectedPercentErrors(j)           = 0;
    end    
end

end

work                    = plotSpinDiffErrorFun(collectedPercentErrors, user, work);

end