How can I draw an arrow between two nodes that are defined in a pic
please.
For example, how can I draw an edge from node A in the left hand side to the node A in the right hand side? Thank you.
My code:
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows, calc}
\begin{document}
\tikzset{
arrow/.style={draw, -latex},
mypic/.pic = {
\node[draw] (a) {A};
\node[draw, below of=a] (b) {B};}
}
\begin{tikzpicture}
\pic at (0,0) {mypic};
\pic at (1,1) {mypic};
\draw[arrow] (a.north east)--(a.south west); % unsurprisingly this doesn't work
\end{tikzpicture}
\end{document}