Changeset 1272


Ignore:
Timestamp:
01/15/07 15:07:00 (13 years ago)
Author:
jukka
Message:

Fixed #1083. 'Belgium' had size rounded to zero and there are no such style, so it appeared as larger than size one. Modified tagclouds to divide sizes logarithmically instead of linear, so spread is more even. Spent 20min.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SectionFolder.py

    r1267 r1272  
    538538        maxcount=0 
    539539        uniques=[] 
     540        from math import log 
    540541 
    541542        def adjust(i): 
     
    544545            if type(b)==int: 
    545546                if b>1: 
    546                     b=int((8*b)/maxcount) 
     547                    b=int((8*log(b,2))/log(maxcount,2)) 
     548                    if b==0: 
     549                        b=1 
    547550                i=(a,b,c,d,e) 
    548551            else: 
     
    638641        if index_type=='Language' or index_type=='getLanguage_skills': 
    639642            uniquetuplelist=[(x[0],x[1],x[2],x[3],lemill_tool.getPrettyLanguage(x[4])) for x in uniquetuplelist] 
     643 
    640644        return uniquetuplelist 
    641645 
Note: See TracChangeset for help on using the changeset viewer.