n_real_to_screen(x, x_value, scale_value, w);},
				function(i) {return atan_screen_to_real(h - i, y_value, scale_value, h);},
				function(y) {return h - atan_real_to_screen(y, y_value, scale_value, h);}
			];
	}

	i_canvas.width = w + panel_w;
	i_canvas.height = h;
	
	function draw_canvas() {
		function draw_arrow(context, x1, y1, x2, y2, color) {
			const d = Math.sqrt(Math.pow(x2-x1, 2) + Math.pow(y2-y1, 2));
			context.beginPath();
			context.moveTo(x1, y1);
			context.lineTo(x2, y2);
			context.moveTo