Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've placed three figures on the same page through the minipage option. However, it looks quite ugly right now.

My latex (beamer) code for this page looks like:

\frame{
\frametitle{Various initial conditions}
% 
% Nomenclature:
% \begin{align}
%  1-0.05(\cos [2 \pi x/L]+\sin [2 \pi x/L])\underbrace{\cos[2 \pi y/L]}_\text{Trailing term}
% \end{align}

\begin{center}
 \begin{figure}[ht] 

\begin{minipage}[b]{0.35\linewidth}\includegraphics[width=.65\linewidth]{/home/dnaneet/Research/Dissertation/wigner/ic/L=lambda/dftdata/L_lambda_max_1wl_zg_E_0001_Cos_profile_0}
\caption{$1-0.05(\cos [2 \pi x/L]+\sin [2 \pi x/L])\cos[2 \pi y/L]$} 
\end{minipage}
\begin{minipage}[b]{0.35\linewidth}\includegraphics[width=.65\linewidth]{/home/dnaneet/Research/Dissertation/wigner/ic/L=lambda/dftdata/L_lambda_max_1wl_zg_E_0001_Sin_profile_0}
\caption{{\tiny $1 - 0.05(\cos [2 \pi x/L] + \sin [2 \pi x/L]) \sin[2 \pi y/L]$}}  
\end{minipage} \\
\begin{minipage}[b]{0.35\linewidth}\includegraphics[width=.65\linewidth]{/home/dnaneet/Research/Dissertation/wigner/ic/L=lambda/dftdata/L_lambda_max_1wl_zg_E_0001_Cos_rot45_profile_0}
\caption{{\tiny $1 - 0.05(\cos [2 \pi (x+y/\sqrt{2}L)] + \sin [2 \pi (x+y/\sqrt{2}L)]) (\cos[2 \pi (x-y/\sqrt{2}L)])$}}  
\end{minipage}




\end{figure}
\end{center}




} 

And the figures look like:

Screenshot of page

Any suggestions on how I can clean this up? I also find that the figure caption has too many spaces between the math symbols. Whats up with that?

My preample is:

\documentclass{beamer}

\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{subfig}
\usepackage{epstopdf}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage[labelformat=empty]{caption}
\usepackage{setspace}
\usepackage[T1]{fontenc}
\usepackage[super,numbers,sort&compress]{natbib}
\usepackage{caption}
% \captionsetup{labelformat=empty,labelsep=none}
% \usepackage{makeidx}
% \usepackage{sidecap}

\setbeamertemplate{footline}[page number]
\setbeamercolor{structure}{bg=yellow, fg=black}
share|improve this question
    
Why are you using minipage? You also forgot one \tiny. –  Sigur Nov 14 '12 at 0:30
    
@Sigur because subfigure is deprecated and my adviser has asked me to use minipage with the view of publication in the future. –  drN Nov 14 '12 at 0:30
1  
Do you really need the \caption on the slides? You can use only \includegraphics inside a tabular to align the figures. Also you are using 3 \caption command inside the same figure environment! –  Sigur Nov 14 '12 at 0:37
    
@Sigur Yes I need the caption to explain how the figures are different from each other. Oh ok, the three captions inside figure... thats an interesting observation! So what do I do to have my captions? –  drN Nov 14 '12 at 0:50
    
What do you think \begin{center} \begin{tabular}{cc} foo & foo \\ text & text \end{tabular} \end{center}? –  Sigur Nov 14 '12 at 0:52
show 3 more comments

1 Answer 1

up vote 0 down vote accepted

How about this?

\documentclass{beamer}

\usepackage{subcaption}
\usecolortheme{wolverine}

\usepackage{tikz}
%\usepackage{graphicx}

\begin{document}

\begin{frame}
\frametitle{Various initial conditions}
    \centering
    \begin{figure}
        \centering
        \begin{subfigure}[b]{0.45\textwidth}
        \centering
            \begin{tikzpicture}
                \path[draw=red,fill=red!20] (0,0) rectangle (3,3);
            \end{tikzpicture}
            \newline
            \tiny Red-square equation:
            $1-0.05(\cos [2 \pi x/L]+\sin [2 \pi x/L])\cos[2 \pi y/L]$
            \phantomsubcaption \label{subfig:red}
        \end{subfigure}%
        \hspace{0.05\textwidth}
        \begin{subfigure}[b]{0.45\textwidth}
        \centering
            \begin{tikzpicture}
                \path[draw=green,fill=green!20] (0,0) rectangle (3,3);
            \end{tikzpicture}
            \newline
            \tiny Green-square equation:
            $1 - 0.05(\cos [2 \pi x/L] + \sin [2 \pi x/L]) \sin[2 \pi y/L]$
            \phantomsubcaption \label{subfig:green}
        \end{subfigure}%
        \vspace{1em}
        \begin{subfigure}[b]{0.45\textwidth}
        \centering
            \begin{tikzpicture}
                \path[draw=blue,fill=blue!20] (0,0) rectangle (3,3);
            \end{tikzpicture}
            \newline
            \tiny Blue-square equation:
            $1 - 0.05(\cos [2 \pi (x+y/\sqrt{2}L)] +
            \sin [2 \pi (x+y/\sqrt{2}L)]) (\cos[2 \pi (x-y/\sqrt{2}L)])$
            \phantomsubcaption \label{subfig:blue}
        \end{subfigure}%
    \end{figure}

\end{frame}

\end{document}

enter image description here

share|improve this answer
    
Very nice! I'll try to incorporate this and be back in a bit! thanks! –  drN Mar 21 '13 at 13:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.