epped(s2x(640)); j += step) {
			if(j != 0) {
				context.moveTo(sharp(x2s(j)), 0);
				context.lineTo(sharp(x2s(j)), h);
			}
			context.fillText(j, sharp(x2s(j)) + 12, sharp(y2s(0)) - 12);
		}
		// vertical
		for(var i = stepped(s2y(640)); i <= stepped(s2y(0)); i += step) {
			if(i != 0) {
				context.moveTo(0, sharp(y2s(i)));
				context.lineTo(w, sharp(y2s(i)));
			}
		}
	} else if(document.getElementById("scale_2").checked) {
		// horizontal
		const x_from = s2x(20);
		const x_to = s2x(620);
		for(var 