答案1
正如所percusse
评论的,baseline
该选项允许您在内部参考上对齐多个 tizpicture。
如果节点锚点不足以满足您的期望对齐(第一个例子),您可以随时定义一个新的坐标作为参考(第二个例子)
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{figure}
\begin{tikzpicture}[baseline=(M.south)]
\node[draw](M){\includegraphics[width=3cm]{example-image}};
\end{tikzpicture}
\hfill
\begin{tikzpicture}[baseline=(M.center)]
\node[draw](M){\includegraphics[width=3cm]{example-image}};
\end{tikzpicture}
\hfill
\begin{tikzpicture}[baseline=(M.north)]
\node[draw](M){\includegraphics[width=3cm]{example-image}};
\end{tikzpicture}
\end{figure}
\begin{figure}
\begin{tikzpicture}[baseline=(aux)]
\node[draw](M){\includegraphics[width=3cm]{example-image}};
\fill[red] ([yshift=2mm]M.south) coordinate (aux) circle(2pt);
\end{tikzpicture}
\hfill
\begin{tikzpicture}[baseline=(aux)]
\node[draw](M){\includegraphics[width=3cm]{example-image}};
\fill[red] ([xshift=1cm]M.185) coordinate (aux) circle(2pt) ;
\end{tikzpicture}
\hfill
\begin{tikzpicture}[baseline=(aux)]
\node[draw](M){\includegraphics[width=3cm]{example-image}};
\fill[red] ([shift={(1cm,-.5cm)}]M.north) coordinate (aux) circle(2pt);
\end{tikzpicture}
\end{figure}
\end{document}