0

How can I insert two little boxes bellow a node in a tikZ picture and then fill those with numbers like this?enter image description here

3

You can use a label which you make rectangle split node from the shapes.multipart library.

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{shapes.multipart}
\begin{document}
\begin{tikzpicture}
\node[circle,draw,minimum size=2em,
    label={[draw,rectangle split,%<-selects shape
        rectangle split parts=2,%<- 2 node parts
        rectangle split horizontal,%<- horizontal split
        yshift=-1ex]below:{10\nodepart{two}10}}]{1};
\end{tikzpicture}
\end{document}

enter image description here

If you want to create several of those, it makes sense to combine these keys to some style.

| improve this answer | |

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.