Is there anyone who would like to help me draw this diagram in LaTeX? :-) I got help yesterday to draw the diagram, point and so on but I can't figure out how to draw the little boxes and the lines between points.
The code I got yesterday, and tried to edit...
\documentclass[margin=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}[>=stealth,font=\scriptsize,scale=1.8]
% draw axis
\draw[->](0,0)--(4,0)node[below]{1};
\draw[->](0,0)--(0,4)node[left]{1};;
% draw ticks
\foreach \i in {1,2,3}
{\draw (\i,0.1)--(\i,-0.1)node[below]{$\frac{\i}{4}$};
\draw (0.1,\i)--(-0.1,\i)node[left]{$\frac{\i}{4}$};
}
% draw bullets
\foreach \i in {0,...,3}
{\foreach \j in {0,...,3}
\node[fill=black,circle,inner sep=1pt] (\i-\j) at (\i,\j) {};
}
% label for bullets x and y
\node[below right] at (2-1){$y_{j}$};
\node[below] at (1-2){$x_{j}$};
\draw(1-2)--(2,2);
\draw(1-2)--(1,3);
\draw[dashed](2-2)--(2,3);
\draw[dashed](1-3)--(2,3);
\draw(2-1)--(3,1);
\draw(2-1)--(2,2);
\draw[dashed](3-1)--(3,2);
\draw[dashed](2-2)--(3,2);
%\draw[decorate,decoration={brace,raise=3pt}](1-2)--(3-2)node[midway,above=4pt] {$|x-y|_\infty$};
% dashed arrows
\draw[dashed,<->](0.2,0)--(0.2,1);
\draw[dashed,<->](0,0.2)--(1,0.2)node[midway,above,font=\tiny]{$2^{-m}=\frac{1}{2}$};
\end{tikzpicture}
\end{document}