
allMreGac = [];
for i = 1:20
   allMreGac = [allMreGac,mre0(i,:)]; 
end

% calculate the max log mres
maxLogMre = max(log10(allMreGac));
logAllMreGac2 = log10(allMreGac);%/maxLogMre;
%logAllMreGac2 = allMreGac2

% calculate the variance of selected levels
varGac = [];
for i = 1:20
   varGac = [varGac,varianceOfSelectedBestPlaces(i,:)]; 
end

% now bring them together for sorting purposes
myTemp = [logAllMreGac2',varGac'];
%myTemp = [allMreGac',varGac'];
[B,IX] = sort(myTemp(:,2));
[sortedValues] = [B,myTemp(IX,1)];

figure;
hold on;
plot(sortedValues(:,1),sortedValues(:,2),'.');
hold off;