summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mwe/example-grid-100x100bp.tex
blob: 5a6ec30082d17c5306108385fdd5e2618132e334 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
\tikzset{unit/.code={\unit=\dimexpr#1\relax}}%
\tikzset{xy/.style={x={#1},y={#1},unit={#1},font={\sffamily\fontsize{.2\unit}{.24\unit}\selectfont},line width=.01\unit}}%
\begin{tikzpicture}[xy=10bp]%
    \path [use as bounding box] (0,0) rectangle (10,10);
    \foreach \x in {5,...,1} {
        \path [fill=blue!\the\numexpr\x*20\relax!red] (5-\x,5-\x) rectangle (5+\x,5+\x);
    }
    \path [draw] (0,0) rectangle (10,10);
    \foreach \x in {0,...,10} {
        \path [draw] (\x,0) rectangle (\x,10);
        \path [draw] (0,\x) rectangle (10,\x);
    }
    \foreach \y in {0,...,9}
    \foreach \x in {0,...,9} {
        \path (\x+.5,\y+.5) node {\x,\y};
    }
\end{tikzpicture}%