vis_files/generate_plots.js
/// Generates a frame for drawing a graph
Generates a frame for drawing a graph
Generates a frame for drawing a graph
function graphframe(x,y,x1,y1,x2,y2,w,labx,laby,vis)
{	
	laby = laby.replace("age:age","  ");
	laby = laby.replace("->","→");
	graphdx = resdx - (x1+x2); graphdy = resdy - (y1+y2);
	addbutton("",x,y,resdx,resdy,CANVASBUT,CANVASBUT,-1,-1);
	addcanbutton("",x1,y2,graphdx,graphdy,-1,RESULTBUT,-1,-1);		
	addcanbutton(labx,x1,y2+graphdy+30,graphdx,30,-1,XLABELBUT,-1,-1);
	addcanbutton(laby,0,y2,30,graphdy,-1,YLABELBUT,-1,-1);
	if(ntickx > 0) addcanbutton("X ticks",x1,y2+graphdy,graphdx,30,-1,XTICKBUT,-1,-1);
	if(nticky > 0) addcanbutton("Y ticks",x1-w,y2,w,graphdy,-1,YTICKTRBUT,-1,-1);
	if(check == 1 && vis.spline_param != null){
		for(i = 0; i < vis.spline_param.length; i++){
			var x = x1+Math.floor(graphdx*(vis.spline_param[i].time-axxmin)/(axxmax-axxmin));
			addcanbutton(vis.spline_param[i].param,x,y2,15,graphdy,PARAMLINEBUT,PARAMLINEBUT,-1,-1);
		}
	}
}
function graphframe ( x , y , x1 , y1 , x2 , y2 , w , labx , laby , vis ) { laby = laby . replace ( "age:age" , "  " ) ; laby = laby . replace ( "->" , "→"); graphdx = resdx - ( x1 + x2 ) ; graphdy = resdy - ( y1 + y2 ) ; addbutton ( "" , x , y , resdx , resdy , CANVASBUT , CANVASBUT , - 1 , - 1 ) ; addcanbutton ( "" , x1 , y2 , graphdx , graphdy , - 1 , RESULTBUT , - 1 , - 1 ) ; addcanbutton ( labx , x1 , y2 + graphdy + 30 , graphdx , 30 , - 1 , XLABELBUT , - 1 , - 1 ) ; addcanbutton ( laby , 0 , y2 , 30 , graphdy , - 1 , YLABELBUT , - 1 , - 1 ) ; if ( ntickx > 0 ) addcanbutton ( "X ticks" , x1 , y2 + graphdy , graphdx , 30 , - 1 , XTICKBUT , - 1 , - 1 ) ; if ( nticky > 0 ) addcanbutton ( "Y ticks" , x1 - w , y2 , w , graphdy , - 1 , YTICKTRBUT , - 1 , - 1 ) ; if ( check == 1 && vis . spline_param != null ) { for ( i = 0 ; i < vis . spline_param . length ; i ++ ) { var x = x1 + Math . floor ( graphdx * ( vis . spline_param [ i ] . time - axxmin ) / ( axxmax - axxmin ) ) ; addcanbutton ( vis . spline_param [ i ] . param , x , y2 , 15 , graphdy , PARAMLINEBUT , PARAMLINEBUT , - 1 , - 1 ) ; } } }
Generates a frame for drawing a graph
Generates a frame for drawing a graph