Since you are new, let us show you how Trendy works.

Close-button

Top 50 Cody players

This plot is broken.

Your code has an error or you are requesting a feature that is not yet available.
  • Created by: Aurelien Queffurust
  • Latest result: Your code has an error or you are requesting a feature that is not yet available.
  • Created on: 27 Jul 2012
  • Liked: 1 time

[Updated 15-Nov-2012 - badges columns have appeared]

This Trend shows the evolution of score for the 50 best Cody players. The idea is to show a time distribution as follows: from the top 50 Cody players, how many players have a score between [2000 3000[ points , [3000 4000[ points ...

Between each interval the maximum value can be 50. So if there are 25 players having a score between [3000 4000[, I will draw a point at y= 3500 . If they are 10 players tomorrow in this same interval , the point will be drawn at y = 3100 ....

See Also :

Plot for Top Players in Cody created by Ned Gulley

My other Trendy about CODY:

My rank in Cody

Plot for Remaining problems to solve

Plot Image
figure('Position',[440 28 560 970])
set(gcf,'color','red')


% keep only unique dates
%subplot(212)
z=datestr(time1775,'dd-mm-yyyy');
[~,b]=unique(cellstr(z));
values2remove = setdiff(1:size(data1775,1),b);
% A =[];
data1775(values2remove ,:) = [];
time1775(values2remove ) = [];
hold all

xlim([time1775(1) time1775(end)])
wegountil  = max(max(data1775));
maxy = floor(wegountil/1000);
ylim([0 maxy ])
score = zeros(size(data1775,1),maxy );
for jj= 1: size(data1775,1) % 39 enregistrement
    count = 0;
    for ii_score = 1000:1000:maxy*1000+1000
        count = count +1;
        score(jj,count)= numel(find(data1775(jj,:)>=ii_score  & data1775(jj,:)<ii_score+1000));
        if score(jj,count) >0 %20 between [1000 and  2000 ]
            %             scaledit = score(ii,:)*10/50+(ii-1)*10
            
            scaledit = (count-1)+score(jj,count)/ 50;
         h = scatter(time1775(jj),scaledit ,'marker','o');%,'displayname', nameforlegend)

set(h, 'SizeData',14)
            switch count 
                case 1 
           
                set(h,'markerfacecolor','red','MarkerEdgeColor','red')
           
                case 2
                 set(h,'markerfacecolor','black','MarkerEdgeColor','black')
                 
                case maxy
                 set(h,'markerfacecolor','green','MarkerEdgeColor','green')
          
                
                 
             
                case maxy-1
                 set(h,'markerfacecolor','cyan','MarkerEdgeColor','cyan')
                 
             
                case maxy -2
                 set(h,'markerfacecolor','magenta','MarkerEdgeColor','magenta')
                 
                otherwise
                    
                  set(h,'markerfacecolor','blue','MarkerEdgeColor','blue')
             end

            
            if jj==  size(data1775,1)

                % display the legend only for last date
                nameforlegend = [int2str(score(jj,count)) ' players > '  int2str(ii_score) ' pts '];
                set(h,'displayname',nameforlegend);
% A{end+1} = score(jj,count);

            else
                set(get(get(h,'Annotation'),'LegendInformation'),...
                    'IconDisplayStyle','off');
            end
        end
    end
    
    
end

datetick
set(gca,'ygrid','on')



gf= title(['Distribution of top 50 Cody players @' datestr(now)]);
set(gf,'fontweight','bold')
ylabel('number of players for this score')

% now score
yis = get(gca,'yticklabel');
yisnumber = str2num(yis)*1000+1000;

% grid on y-axis only , axis location to right
set(gca,'yticklabel',yisnumber,...
'YGrid','on',...
'YAxisLocation','right')

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LEGEND 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
hl = legend('location','BestOutside')
set(hl,'color','yellow')


% remove tick length
 set(gca,'ticklength',[0 0])



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FIRST PLOT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% subplot(211)
% plot(time1775,data1775)
% % top 3 will be plot(time1775,data1775(:,1:3))
% datetick('x')
% ylabel('Score')
% set(gca,'YGrid','on','YAxisLocation','right')
% title('Score evolution of top 50')

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% THIRDPLOT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%subplot(313)
% bar(cell2mat(A))
Tags:

Add Tags


5 comments

Aurelien Queffurust almost 2 years ago

wow I finally managed to show correctly the evolution of score .
Until this fix , legend was wrong and all data were linear.
Now we can see that when a Cody player has scored above 2000 points , the red line decreases whereas the black line increases ...

Aurelien Queffurust over 1 year ago

29-October-2012 : new player above 7000 pts!

Aurelien Queffurust over 1 year ago

14-Dec-2012 I am Alone in the interval [7000-8000]. Both Richard and @bmtran seem unreacheable!

Aurelien Queffurust over 1 year ago

I do not manage to find the best location for my legend : either the legend is truncated , or subplot 212 becomes too small

José Ramón Menzinger 9 months ago

I made yesterday some new plots and I tested some possibilities to make the plots nicer.

My choice was at the end to place the legend "SouthOutside", but first I created the figure with a defined position, like this:
figure('Position',[440 28 560 970])

that means a larger figure, so it fits better on this web design. ;-)

Also I added an empty line on the x-label, so it's shown separeted to the x-ticks.

Take a look to the code of my plots. I will appreciate your comments.