I want to position a node relative to a \pic. I'm able to position a \pic relative to a node, but I want it the other way.
\documentclass{standalone}
\usepackage{tikz}
\tikzset{
pics/mp3/.style args={scale #1}{
code={
\begin{scope}[scale=#1,every node/.style={scale=0.8*#1}]
\draw[rounded corners=10*#1] (-3,-1) rectangle (3,1);
\draw[rounded corners=5*#1] (2.8,0.5) rectangle (1.8,-0.5);
\draw[rounded corners=5*#1] (-1.5,0.6) rectangle (1.5,-0.6);
\end{scope}
}
}
}
\begin{document} \begin{tikzpicture}
%% Position a pic relative to a node:
\node (foo) at (0,2) {blubber};
\pic[above of=foo] {mp3={scale .5}};
%% Position a node relative to a pic:
\pic (bar) at (0,-2) {mp3={scale .5}}; %% This doesn't create a named shape.
%\node[below of=bar] {bimbaz}; %% Package pgf Error: No shape named bar is known.
\end{tikzpicture} \end{document}
So, is there any way to name this \pic?
