[Tex/LaTex] How to add the circle, star inside the diamond

tikz-pgf

I wish to add the circle inside the diamond, and star inside the circle like in the photo.

enter image description here

However, using my code,

\node[draw, diamond, above=of aux] (diamond) {};
\node[draw,circle,above=of aux,minimum size=2mm,inner sep=0pt]{};
\node[draw, star,above=of aux,minimum size=0.01mm](star){};

centers of the circle, diamond and star are not the same as shown in the following picture.

enter image description here

What's the problem with the code?

Best Answer

You don't have to use the above key, just put all the node at the same point.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}
\node[draw, fill, star, star points=6, minimum size=5mm] at (0,0){};
\node[draw, circle, minimum size=8mm] at (0,0){};
\node[draw, diamond, minimum size=1.5cm] at (0,0){};
\end{tikzpicture}
\end{document}

result

Edit: To make the picture smaller, you may either change all minimum size keys, or put the whole in a \resizebox like this:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\begin{document}
\resizebox{1cm}{!}{%
    \begin{tikzpicture}
    \node[draw, fill, star, star points=6, minimum size=5mm] at (0,0){};
    \node[draw, circle, minimum size=8mm] at (0,0){};
    \node[draw, diamond, minimum size=1.5cm] at (0,0){};
    \end{tikzpicture}
}
\end{document}

To put all above an (aux) node, you may use:

\node[above=of aux,anchor=center] { \resizebox{ ... tikz construction ... } };

where \resizebox{ ... } is the above construction