我使用以下代码绘制了tikz
两个矩阵(两列数组):
\documentclass[crop,tikz,convert={outext=.svg,command=\unexpanded{pdf2svg \infile\space\outfile}},multi=false]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning, matrix, arrows.meta}
\begin{document}
\begin{tikzpicture}[x=1cm,y=1.5cm]
\matrix (N) [%
matrix of nodes,
nodes={
rectangle,
minimum height=6mm,
minimum width=15mm,
anchor=center,
inner sep=0pt, outer sep=0pt
}
] at (3, 0) { $\$_0\$_0\$_0$ \\ $AC\$_1$ \\ $TC\$_2$ \\ $ACA$ \\ $\$_2GA$ \\ $\$_0TA$ \\ $\$_1TA$ \\ $CAC$ \\ $CAC$ \\ $GAC$ \\ $TAC$ \\ $TAC$ \\ $CTC$ \\ $C\$_2G$ \\ $\$_0\$_0T$ \\ $C\$_1T$ \\ $ACT$ \\ };
\draw (N-1-1.north west) rectangle (N-17-1.south east);
\node[above=3pt of N-1-1]{$Node$};
\matrix (W) [%
matrix of nodes,
nodes={
rectangle,
minimum height=6mm,
minimum width=9.5mm,
anchor=center,
inner sep=0pt, outer sep=0pt
}
] at (6, 0) { $T$ \\ $T$ \\ $G$ \\ $C$ \\ $C$ \\ $C$ \\ $C^-$ \\ $\$_3$ \\ $\$_1$ \\ $A$ \\ $T$ \\ $A^-$ \\ $\$_2$ \\ $A$ \\ $A$ \\ $A$ \\ $C$ \\ };
\draw (W-1-1.north west) rectangle (W-17-1.south east);
\node[above=3pt of W-1-1]{$W$};
\end{tikzpicture}
\end{document}
但是,我该如何在它们的条目之间建立联系呢?
编辑
如果我使用它\draw (N-1-1) -- (W-5-1);
来连接条目,结果如下: