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

Close-button

Plot for Top Players in Cody

Plot Image
% Top Players in Cody
%   time vector is: time1748
%   data vector is: data1748

t = time1748;
d = data1748;

keep = t>(now-180);
t = t(keep);
d = d(keep,:);

v = [];
for i = 1:length(t)
    for j = 1:(size(d,2)/2)
        v(end+1,:) = [t(i) d(i,[2*j-1 2*j])];
    end
end

playerTable = { ...
  3437206,'rifat ahmed';
  963450,'Clemens Giegerich';
  2722350,'@bmtran';
  2789428,'Richard Zapor';
  470811,'Venu Lolla';
  734801,'Binbin Qi';
  2391181,'Aurelien Queffurust';
  504719,'Amitava Biswas';
  1379371,'Alfonso Nieto-Castanon';
  1189631,'Ben Petschel';
  2747253,'Mark';
  3334064,'Freddy';
  2943139,'Bart Vandewoestyne';
  404847,'Christopher';
  33802,'James';
  1861624,'Grzegorz Knor';
  649595,'Alan Chalker';
  2623746,'Prateep Mukherjee';
  1841757,'the cyclist';
  496166,'Tim';
  891763,'Yuval Cohen';
  3263429,'Nikolai';
  2282513,'Raphael Cautain';
  3291011,'S L';
  413337,'Martijn';
  744956,'Vincent';
  1962870,'Amro';
  2333895,'Tomasz';
  3529521,'Matt Eicholtz';
  415894,'David Young';
  1917002,'yuval tr';
  3372125,'K';
  2334019,'Fel';
  599720,'Matt Baran';
  1063408,'Peter Wittenberg';
  2210440,'Franck Dernoncourt';
  2654876,'Bart';
  3413081,'Stefan';
  2373420,'Chendra';
  1967755,'blaat';
  3290269,'James Kristoff';
  2689605,'Sangeeta';
  1011447,'Tobias';
  1702345,'Bert';
  1904570,'David Hruska';
  2372892,'eric landiech';
  1538946,'proecsm';
  1449599,'Denis Koch';
  17831,'Nicholas Howe';
  1326470,'Sven';
  2049607,'Kuifeng';
  1448465,'Dirk Engel';
  343082,'Jean-Marie SAINTHILLIER';
  869884,'Khaled Hamed';
  2255311,'Jose Ramon Menzinger';
  870409,'Claudio Gelmi';
  3354683,'Yaroslav';
  3877541,'Mehmet';
  4345310,'Jan Orwat';
};

nameHash = java.util.Hashtable; 
for i = 1:size(playerTable,1)
    nameHash.put(playerTable{i,1},playerTable{i,2});
end

profids = d(end,1:2:end);

leaderNameList = {};
hold all
set(gca,'ColorOrder',jet(10))
for i = 1:length(profids)
  ix = v(:,2)==profids(i);
  t1 = v(ix,1);
  d1 = v(ix,3);
  plot(t1,d1,'LineWidth',2)
  name = nameHash.get(profids(i));
  if isempty(name)
    name = 'UNKNOWN';
  end
  leaderNameList{end+1} = name;
end
hold off
datetick
legend(leaderNameList,'Location','EastOutside')
set(gcf,'Color','white')
Tags:

Add Tags


19 comments

very nice plot!

Ned,
Is is correctly updated ? I mean I see that for example the trend of Mark is not updated anymore (he is currently 11th) , we should see the other Cody player James instead.

Thanks for pointing out the problem Aurelien! I meant to cycle through the current leaders, but instead I was cycling through the top ten when I started gathering data. Should be fixed now.

cool! It looks like very nice now with the legend.

Your plit is broken , maybe it comes (like me) from the bug of 14 Sep 2012 06:07:17 . Trendy has returned NaN .

Thanks for the reminder...

It wasn't the NaN. My code looks up each players name based on their profile ID, and my name table didn't yet include Khaled, because he has made such a meteoric rise. Should be a little more robust now.

Ah ok , you mean that if one Cody player is not in your playerTable , the Trendy will fail.

Right. That's what WAS happening, but it shouldn't have that problem anymore.

Badges, introduced in mid-November, provided a big one-time jump in the scores.

... and the recent rescoring of solutions to eliminate the feval trick has provided a small drop in the score for some of use :-)

Hey, heeeeeey!!! I'm also on this (veeeery) nice plot!! ;-)

There is a new player on the top 10... Mr. Clemens Giegerich! ;-)

Why looks now my name on the legend so "squared"?? :-(

here it looks good: http://www.mathworks.de/matlabcentral/trendy/plots/1167

Hi José:

I'm puzzled by that too. I'll keep working at it, but in the meantime, I changed your squared letters so they will display. I know you want your é and your ó back, but for now I think this is better than little white boxes.

Thanks! ;-)

It seems that player table needs an update :-)

You are right, Jan! Congratulations, and sorry for not having your name up there right away!

Thanks, Ned. Very nice plot!

This chart is so beautiful, to see the top players on Cody. One day my name will be there!