];

		// the grid
		const scale = scale_value;
		const step = scale < 16 ? 1 : Math.floor(scale / 8);
		const stepped = function(x) {return Math.floor(x / step) * step;}

		context.beginPath();
		context.setLineDash([2, 3]);

		// horizontal
		{
			const x_from = s2x(20);
			const x_to = s2x(w-20);
			for(var i = Math.sign(x_from) * Math.floor(Math.log2(Math.abs(x_from))) - 1; i <= Math.sign(x_to) * Math.ceil(Math.log2(Math.abs(x_to))); ++i) {
				if(i == 0)
					continue;
				const x_i = Math.sign(i) * Mat