![两张图片的子标题底部对齐](https://linux22.com/image/411181/%E4%B8%A4%E5%BC%A0%E5%9B%BE%E7%89%87%E7%9A%84%E5%AD%90%E6%A0%87%E9%A2%98%E5%BA%95%E9%83%A8%E5%AF%B9%E9%BD%90.png)
如何修复对齐,以便两个子图都底部对齐?
\documentclass[]{article}
\usepackage{subcaption}
\usepackage{tikz}
\usetikzlibrary{shapes.misc}
%opening
\begin{document}
\begin{figure}
\begin{subfigure}[b]{0.3\textwidth}
\begin{tikzpicture}
\node[shape=circle,draw=black, ] (B) at (0,1) {};
\node[shape=circle,draw=black,] (C) at (0,2) {};
\node[shape=circle,draw=black, ] (A) at (0,0) {};
\end{tikzpicture}
\end{subfigure}
%\hfill
\begin{subfigure}[b]{0.5\textwidth}
\[
\left(\begin{array}{cccccc}
& & & & &\\
& & & & & \\
& & & & & \\
& & & & & \\
& & & & & \\
& & & & &
\end{array}\right)
\]
\end{subfigure}
\caption{Edysdfsdfsdf}
\end{figure}
\end{document}
答案1
使用作为和baseline=(current bounding box.center)
的选项:tikzpicture
\begin{array}[c]
根据所需的对齐方式,您可能需要调整两个子图的宽度以确保标题水平居中。
\documentclass[]{article}
\usepackage{subcaption}
\usepackage{tikz}
\usetikzlibrary{shapes.misc}
%opening
\begin{document}
\begin{figure}
\begin{subfigure}[b]{0.3\textwidth}
\begin{tikzpicture}[baseline=(current bounding box.center)]
\node[shape=circle,draw=black, ] (B) at (0,1) {};
\node[shape=circle,draw=black,] (C) at (0,2) {};
\node[shape=circle,draw=black, ] (A) at (0,0) {};
\end{tikzpicture}
\end{subfigure}
%\hfill
\begin{subfigure}[b]{0.5\textwidth}
\[
\left(\begin{array}[c]{cccccc}
& & & & &\\
& & & & & \\
& & & & & \\
& & & & & \\
& & & & & \\
& & & & &
\end{array}\right)
\]
\end{subfigure}
\caption{Edysdfsdfsdf}
\end{figure}
\end{document}