I am creating the legend of a figure in Tikz, and would like to align two rectangles with text:
\node(legend) at (1.7,-6.75) {Legend: };
\node[right=0.5cm of legend] (myNode) {};
\draw[](myNode) rectangle +(0.4,0.2);
\node[right=1.5cm of legend] (myNode) {};
\draw[](myNode) rectangle +(0.4,0.2);
I am able to draw the rectangles, but they seem to be aligned with their bottom left corner to the center of the 'legend' node. How do I align the center of the rectangles to the center of the 'legend' node?
\documentclass
and ending with `\end{document} which reproduce your problem.