function Plot_retrieved_location(trial_data,parameter,load)
% Plots the retrieved location as deviations from the target. 

figure('Color',[1 1 1 ])


count = 0;
for trial = 1:parameter.trialcount
    for token = 1:load
        
        count = count + 1;
        
        deviations(count) = rad2deg(trial_data(trial,token).raw_deviation);
        presented_items(count,:) = trial_data(trial,token).presented_items;
        
        %deviations relative to the target
        token1_deviations(trial) = rad2deg(trial_data(trial,1).raw_deviation);
        
      %  token2_deviations(trial) = rad2deg(trial_data(trial,2).raw_deviation);
      
        
        %actual representation values
        representations(trial,token,:) = trial_data(trial,token).representation/max(trial_data(trial,token).representation);
                
        %actual retrieved value in 360 degrees
        retrieved_locations1(trial) = trial_data(trial,1).retrieved_location;
      %  retrieved_locations2(trial) = trial_data(trial,2).retrieved_location;
    end
end

%subplot(1,2,1)
hist(deviations,30);
% a = mean(deviations);
% b = median(deviations);
% c = sprintf('TOKEN 1 [smaller] mean = %f , median = %f',a,b);
% title(c,'FontSize',14);

% subplot(1,2,2)
% 
% hist(retrieved_locations2,30);
% g = mean(retrieved_locations2);
% h = median(retrieved_locations2);
% i = sprintf('TOKEN 2 [large] mean = %f , median = %f',g,h);
% title(i,'FontSize',14);



% d = mean(deviations);
% e = median(deviations);
% f = sprintf('ALL ITEMS [rand rand] mean = %f , median = %f',d,e);
% title(f,'FontSize',14);
% 
% subplot(1,3,3)

% 
% % figure
% hist(retrieved_locations,50);
% title('retrieved_locations');

keyboard

end 

