I would like to add two figures figures to a beamer slide, one on top of the other. Is there a simple command, similar to \linewidth
or \textwidth
for the height? The figures have dimensions roughly twice as wide as they are tall. I would like them to use the full vertical space without encroaching on the title/controls. If their dimensions were reverse, I would put them side by side using width=0.5\linewidth
. I am not sure the height analog.
Here is what I am using now. As an alternative, I use the \paperhieght
but then have to visually check that the chosen scale factor left enough room for the title and controls at the bottom.
\begin{frame}{4$\times$167 gH5 in 10 mM K$^{+}$: Comparison}
\begin{center}
\includegraphics[height=0.4\paperheight]{figures/array_models/i1_r_c000_4x167_h5_k010_33_fit}\\
\onslide<2>{
\includegraphics[height=0.4\paperheight]{figures/array_models/i1_r_best1000_c000_4x167_h5_k010_33_fit}
}
\end{center}
\end{frame}
In addition to having to check the scale factor, this also has the disadvantage that it must be changed if I add/remove the frame title or switch to a different theme. If there I instead used the available slide height, it may not need to be updated.
Best Answer
@cfr is right. The dimension
\beamer@frametextheight
is calculated very lately. In fact, this dimension is used at only two places:\framezoom
andshrink
. Thus one has two ways to utilize the full vertical space.However it is annoying that the contents are not centered.
One might want to checkbeamerbaseframesize.sty
and modify the calculation by themselves.One might use the hook used by
shrink
but, instead, fill in the content they want.