アットウィキロゴ

o990

var point = new Array();
var x = new Array();
var year = new Array();
var pointx = new Array();
var p1;
 
function sample() {
 
 
    for (s = 1; s < 1001;s++ ){
    point[s] = 0;
    for(sx=1;sx<3;sx++){
    if(Math.random()>0.5)point[s]=point[s]+1;    
    }    
    }
 
    for(sx=0;sx<3;sx++){
    pointx[sx]=0;    
    }   
 
      for(s=1;s<1001;s++){
          n = point[s];
          pointx[n] = pointx[n] + 1;
    }   
 
 
 
        paint();
 
 
 
 
 
 
 
 
 
}
 
 
 
function paint(){
 
var sub=new svgpaint();
 
str="<svg width=\"500\" height=\"500\">";
 
str=str+sub.rect(0,0,500,500,"blue");
for(s=0;s<3;s++){
str=str+sub.rect(100*s,500-pointx[s]/2,100,pointx[s]/2,"red");    
} 
 
str=str+"</svg>";
 
$("#memo").html(str);   
 
} 
 
最終更新:2016年03月02日 23:42