我想将三个图形放在彼此下方,然后在左侧放置一个颜色条 - 参见下面的示例图。我尝试使用 minipages 和 subfloat,但没有成功。有人知道怎么做吗?
诚挚问候 Trine
我曾尝试使用此代码 - 但它不能正常工作并出现一些错误。
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\newsavebox{\measurebox}
\begin{document}
\begin{figure}
\centering
\sbox{\measurebox}{
\begin{minipage}[b]{.85\textwidth}
\centering
\subfloat
{\label{fig:figB}\includegraphics[scale=0.38]
{figures/Gom_correlate/Facet19Stage2}\subcaption{}\vspace{3mm}}
\vfill
\subfloat
{\label{fig:figB}\includegraphics[scale=0.38]{figures/Gom_correlate/Facet19Stage2}\subcaption{}\vspace{3mm}}
\vfill
\subfloat
{\label{fig:figC}\includegraphics[scale=0.385]{figures/Gom_correlate/Facet10Stage2}}
\subcaption{}
\end{minipage}}
\usebox{\measurebox}\qquad
\begin{minipage}[b][\ht\measurebox][s]{.09\textwidth}
\includegraphics[scale=0.25]{figures/Gom_correlate/ColourBar}
\label{fig:figA}
\end{minipage}
\caption{Difference in strain at stage 2 for different facet sizes, a) the standard size of 19 pixel, b) 10 pixel and c) 30 pixel.}
\end{figure}
\end{document}
答案1
请尝试以下操作:
\documentclass{article}
\usepackage[demo,
export]{adjustbox}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{tabularx}
\newsavebox{\measurebox}
\begin{document}
\begin{figure}[htb]
\sbox\measurebox{\begin{minipage}{0.8\linewidth}\centering
\includegraphics[scale=0.38]{figures/Gom_correlate/Facet19Stage2}
\subcaption{}
\label{fig:figA}
\includegraphics[scale=0.38]{figures/Gom_correlate/Facet19Stage2}
\subcaption{}
\label{fig:figB}
\includegraphics[scale=0.385]{figures/Gom_correlate/Facet10Stage2}
\subcaption{}
\label{fig:figC}
\vspace*{-4ex}
\end{minipage}
}
\centering
\begin{tabular}{m{0.8\linewidth} m{0.12\linewidth}}
\usebox\measurebox
&
\includegraphics[height=\dimexpr\ht\measurebox+\dp\measurebox,
width=\linewidth, valign=c]
{figures/Gom_correlate/ColourBar}
\end{tabular}
\vspace{4ex}
\caption{Difference in strain at stage 2 for different facet sizes, a) the standard size of 19 pixel, b) 10 pixel and c) 30 pixel.}
\label{fig:fig}
\end{figure}
See Fig. \ref{fig:fig}, particularly sub figure \ref{fig:figC}.
\end{document}
上述 mwe 给出:
这就是你要找的吗?
答案2
把它变成一张图片怎么样?这样你就可以插入一张包含三张图片和颜色条的图片?我想我会这么做的 :)