带有子浮点数且图像位置错误的表格图形

带有子浮点数且图像位置错误的表格图形

我有一个图形,我希望中间的图像完全位于顶部和底部边框之间,但是它却向下:

在此处输入图片描述

    \documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}





\usepackage{multirow}
\usepackage{subfig}

\begin{document}

\begin{figure*}
\centering
\begin{tabular}{ccc}
\subfloat[joint effort action]{%
            {\includegraphics[width=0.245\textwidth]{example-image}}
            }

& 

\multirow{2}{*}{\subfloat[State machine behavior sequence]{%
                    {\includegraphics[width=0.43\textwidth]{example-image}}
                    }
                    }

& 

\subfloat[end-effector wrench]{
                    {\includegraphics[width=0.245\textwidth]{example-image}}
                    } \\

\subfloat[joint position feedback]{%
                    {\includegraphics[width=0.245\textwidth]{example-image}}
                    }

&                    
& 

\subfloat[end-effector pose feedback]{%
                    {\includegraphics[width=0.245\textwidth]{example-image}}
                    }
\end{tabular}
 \label{fig:fifig}%
\end{figure*}

\end{document}

有人知道如何修复它以便(b)图像正好位于上下边框的中间吗?

答案1

在此处输入图片描述

使用adjustbox(用于将图像基线移动到其顶部)和subcaption包(用于将子图对齐到顶部):

\documentclass{article}
\usepackage[export]{adjustbox}
\usepackage{multirow}
\usepackage[skip=1ex]{caption}
\usepackage{subcaption}

\begin{document}
    \begin{figure*}
    \centering
    \captionsetup[subfigure]{justification=raggedright}
    \setkeys{Gin}{width=\linewidth}
\begin{tabular}{ccc}
\begin{subfigure}[t]{0.22\linewidth}%
    \includegraphics[valign=t]{example-image-a} 
\caption{joint effort action}
\end{subfigure}
    &   \multirow{2}[4]{*}{%
        \begin{subfigure}[t]{0.55\linewidth}%
            \includegraphics[valign=t]{example-image}
        \caption{State machine behavior sequence}
        \end{subfigure}}
        &   \begin{subfigure}[t]{0.2\linewidth}%
                \includegraphics[valign=t]{example-image}
            \caption{end-effector wrench}%
            \end{subfigure}     \\
\begin{subfigure}[t]{0.22\linewidth}%
    \includegraphics[valign=t]{example-image-b}
\caption{joint position feedback}
\end{subfigure}
    &   &   \begin{subfigure}[t]{0.22\linewidth}%
                \includegraphics[valign=t]{example-image}
            \caption{end-effector pose feedback}
            \end{subfigure}
\end{tabular}
\caption{my figures}
\label{fig:fifig}%
    \end{figure*}
\end{document}

相关内容