Graphics, Figures & Tablesbeamer | Figure and Table in a Row

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
michaelwujian
Posts: 5
Joined: Thu Oct 13, 2011 9:35 pm

beamer | Figure and Table in a Row

Post by michaelwujian »

hi, I want to let a figure and a table side by side in a row, but they just in a column, up and down. I can find out where is the problem. Can anyone point it out?

\begin{frame}

\frametitle{Data Resources}

\begin{figure}[htb]

\begin{minipage}{0.6\textwidth}
\centering
\includegraphics[width=0.6\textwidth]{spotprice19912009}
\end{minipage}


\begin{minipage}{0.3\textwidth}

\centering
\begin{tabular}{lr}
\hline
Mean & 36.04987 \\
Median & 25.64500 \\
Maximum & 145.3100 \\
Minimum & 10.82000 \\
Std.~Dev. & 24.76395 \\
Skewness & 1.694741 \\
Kurtosis & 5.704589 \\
Jarque-Bera & 3730.905 \\
Probability${^{**}}$ & 0.000000 \\
\hline
\end{tabular}

\end{minipage}

\end{figure}


\end{frame}

QQ截图20111022223459.jpg
QQ截图20111022223459.jpg (26.85 KiB) Viewed 7324 times
Last edited by michaelwujian on Sun Oct 23, 2011 12:08 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

beamer | Figure and Table in a Row

Post by sommerfee »

michaelwujian wrote:...
\end{minipage}


\begin{minipage}{0.3\textwidth}
...


An empty line will start a new paragraph in TeX. So simply remove the empty line(s) between the minipages.
michaelwujian
Posts: 5
Joined: Thu Oct 13, 2011 9:35 pm

beamer | Figure and Table in a Row

Post by michaelwujian »

sommerfee wrote:
michaelwujian wrote:...
\end{minipage}


\begin{minipage}{0.3\textwidth}
...


An empty line will start a new paragraph in TeX. So simply remove the empty line(s) between the minipages.

Thanks! Solved! Sometimes a little change may cause big trouble. Much to learn!
Post Reply