How can I insert two little boxes bellow a node in a tikZ picture and then fill those with numbers like this?
Asked
Active
Viewed 60 times
1 Answers
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}
If you want to create several of those, it makes sense to combine these keys to some style.
