I want to draw the first orders of a Hilbert curve and a Lebesgue curve. In order to draw a Hilbert curve I use the following tikZ code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{lindenmayersystems}
\begin{document}
\pgfdeclarelindenmayersystem{Hilbert curve}{
\rule{L -> +RF-LFL-FR+}
\rule{R -> -LF+RFR+FL-}}
\begin{tabular}{cc}
\begin{tikzpicture}
\shadedraw [bottom color=white, top color=white, draw=black]
[l-system={Hilbert curve, axiom=L, order=4, step=8pt, angle=90}]
lindenmayer system;
\end{tikzpicture}
\end{tabular}
\end{document}
Then I tried to arrange the first orders side by side and I got this:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{lindenmayersystems}
\begin{document}
\pgfdeclarelindenmayersystem{Hilbert curve}{
\rule{L -> +RF-LFL-FR+}
\rule{R -> -LF+RFR+FL-}}
\begin{tabular}{cc}
\begin{tikzpicture}
\foreach \i in {1,...,4}{
\begin{scope}[xshift=2*\i cm,yshift=0cm,rotate=0]
\shadedraw [bottom color=white, top color=white, draw=black]
[l-system={Hilbert curve, axiom=L, order=\i, step=8pt, angle=90}]
lindenmayer system;
\end{scope}
}
\end{tikzpicture}
\end{tabular}
\end{document}
But they are not really good arranged. How can I arrange them in such a way, that they have the same size with a constant distance to each other?
I would appreciate any help!