var point = new Array();
var x = new Array();
var year = new Array();
var pointx = new Array();
var p1;
function sample() {
for (s = 1; s <10001;s++ ){
point[s] = 0;
for(sx=1;sx<1001;sx++){
if(Math.random()>0.6)point[s]=point[s]+1;
}
}
for(sx=0;sx<101;sx++){
pointx[sx]=0;
}
for(s=1;s<10001;s++){
n = point[s];
n = n / 10;
m = Math.floor(n);
pointx[m] = pointx[m] + 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<101;s++){
str=str+sub.rect(5*s,500-pointx[s]/10,5,pointx[s]/10,"red");
}
str=str+"</svg>";
$("#memo").html(str);
}
最終更新:2016年03月03日 03:35