0

I want to write a MPM graph for my students. For the moment, here is a short example of what I can do :

\begin{tikzpicture}
  \node[draw,black] (A) at (0,1) {
    \begin{tabular}{|c|c|}
      \hline
      \textbf{A} & (2) \\
      \hline
      \textcolor{blue}{0} & \textcolor{red}{5} \\
      \hline
      \textcolor{green}{5} & \textcolor{purple}{0} \\
      \hline
    \end{tabular}
  };
  \node[draw,black] (B) at (3,1) {
    \begin{tabular}{|c|c|}
      \hline
      \textbf{B} & (4) \\
      \hline
      \textcolor{blue}{2} & \textcolor{red}{7} \\
      \hline
      \textcolor{green}{5} & \textcolor{purple}{0} \\
      \hline
    \end{tabular}
  };
  \draw[->,>=latex,black,very thick] (A.east) -- (B.west);
\end{tikzpicture}

The problem is the following : if I don't use the "draw" option in defining the nodes, the arrows are not pointing at the right places. But if I use "draw", then I have an ugly rectangle around my tabular.

Is there a way that I can combine the best of both options ?

Thank you.

  • 1
    It is not entirely obvious to me what you mean by "right places" here. Do you mean that the arrow should start/stop at the borders of the tabular? – Torbjørn T. Apr 11 '17 at 16:46
  • Yes, exactly. But it starts a few millimeters away. And other options, such as including the tabular environments in a minipage, resulted in the arrows starting at even wronger places... In fact, I think there is some automatic space around the tabular, which I would like to cancel. – Nicolas FRANCOIS Apr 11 '17 at 16:52
  • 1
    You're right about that, replace draw with inner sep=0pt. – Torbjørn T. Apr 11 '17 at 16:53

0 Answers0