I would like to do the following graphic in tikz. But I do not konw how to proceed...

enter image description here

How could I do that?


So far, I have tried simpler things (before getting to this bigger problem). I have tried this for example, but I know that there are certain elements that I do not handle in the right way (like the $\times$ to do crosses...).

\foreach \x in {1,2,3,4} {
    \foreach \y in {1,2,3,4} {
        \path[draw, thin, dotted] (\x,\y) -- (\x,\y+1);
        \path[draw, thin, dotted] (\x,\y) -- (\x+1,\y);
\path[draw, thick] (1,1) rectangle (5,5);

\node  at  (2.1,3.1) {$\times$};

\node  at  (3,0.5) {$X_1$};
\node  at  (0.5,3) {$X_2$};
  • 1
    Can you show us what you've tried so far? – Paul Gessler Sep 3 '14 at 12:47


  \draw[thick] (0,0) rectangle (6,6);
  \node at (0.1,-0.2) {0} node at (3,-0.3) {$X_1$} node at (6,-0.2) {1};
  \node at (-0.2,0) {0} node at (-0.3,3) {$X_2$} node at (-0.2,6) {1};
  \draw[blue,dash pattern=on 1pt off 1pt] (1.5,1)node {+} -- (4,1) node{$\times$} -- (4,3) node{+} --(0.5,3)node{$\times$} --(0.5,4)node{+} --(3,4)node{$\times$} --(3,5)node{+} --(1.5,5)node{$\times$} --(1.5,1) ;
 \path[blue] (5.5,2) node {$\times$} -- (5.5,2) node{+};

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.