Class/Graph.js
// DRAW AXES: draw axes and labels		
DRAW AXES: draw axes and labels
DRAW AXES : draw axes and labels
drawaxes (xlabel,ylabel){		
		if(typeof(xlabel)==='undefined') xlabel = 'x';
		if(typeof(ylabel)==='undefined') ylabel = 'y';		
		this.ctx.strokeStyle = '#000000';
		this.ctx.lineWidth = 2;
		this.ctx.beginPath() ;
		this.ctx.moveTo(this.x_min,this.y_orig);
		this.ctx.lineTo(this.x_max,this.y_orig);
		this.ctx.moveTo(this.x_orig,this.y_min);
		this.ctx.lineTo(this.x_orig,this.y_max);
		this.ctx.stroke();
		this.ctx.font = "12pt Arial";
		this.ctx.fillStyle = '#000000';
		this.ctx.textAlign = "left";
		this.ctx.textBaseline = "top";
		this.ctx.fillText(xlabel,this.x_max + 0.75 * this.tw,this.typos - this.th / 2);
		this.ctx.fillText(ylabel,this.txpos + this.tw / 2 +5,this.y_max - 1.5 * this.th);
	}
drawaxes ( xlabel , ylabel ) { if ( typeof ( xlabel ) === 'undefined' ) xlabel = 'x' ; if ( typeof ( ylabel ) === 'undefined' ) ylabel = 'y' ; this . ctx . strokeStyle = '#000000' ; this . ctx . lineWidth = 2 ; this . ctx . beginPath ( ) ; this . ctx . moveTo ( this . x_min , this . y_orig ) ; this . ctx . lineTo ( this . x_max , this . y_orig ) ; this . ctx . moveTo ( this . x_orig , this . y_min ) ; this . ctx . lineTo ( this . x_orig , this . y_max ) ; this . ctx . stroke ( ) ; this . ctx . font = "12pt Arial" ; this . ctx . fillStyle = '#000000' ; this . ctx . textAlign = "left" ; this . ctx . textBaseline = "top" ; this . ctx . fillText ( xlabel , this . x_max + 0.75 * this . tw , this . typos - this . th / 2 ) ; this . ctx . fillText ( ylabel , this . txpos + this . tw / 2 + 5 , this . y_max - 1.5 * this . th ) ; }
DRAW AXES: draw axes and labels
DRAW AXES : draw axes and labels
//axis labels