[Tex/LaTex] Changing margins in a beamer frame

beamermargins

I made a beamer presentation. In one of the frames I have a couple of pictures. However the left margin takes up a lot of space and the right margin is nearly zero. Having \centering in the figure also does not help, since the skewness of the location of the figures has to do with the margins.

How can I change margins locally? Can I use something similar to a geometry package? How do I define that within a frame?

\documentclass[xcolor=dvipsnames, table]{beamer} 
\usetheme{Frankfurt} 
\usepackage{framed}
\usepackage{graphicx,bm, multirow, subfig, tabularx}
\usepackage[]{textpos}
\usepackage{tikz} 
\usetikzlibrary{calc,shapes.callouts,shapes.arrows, chains,shapes.multipart}
\usepackage{xcolor}
\usepackage[T1]{fontenc}

\begin{document}
\begin{frame}[plain]{Caption 1}   
\begin{figure}
\centering
\begin{tabularx}{\linewidth}{@{}cXX@{}}
\begin{tabular}{cc}

\subfloat[title 1]{\includegraphics[height=5cm, width=5.5cm]{pic1.jpg}} 
   & \subfloat[title 2]{\includegraphics[height=5cm, width=5.5cm]{pic2.jpeg}}\\
\end{tabular}
\end{tabularx}
\end{figure}
\end{frame}
\end{document}

enter image description here

Best Answer

Use for \useoutertheme{infolines}, this reduces the left margin, then remove the \tabularx{} code as indicated. Keep the inner tabular with {rr} alignment.

\documentclass[xcolor=dvipsnames, table]{beamer} 
\usetheme{Frankfurt}
\useoutertheme{infolines}
\usepackage{framed}
\usepackage{graphicx}
\usepackage{bm, multirow, subfig,tabularx}
\usepackage[]{textpos}
\usepackage{tikz} 
\usetikzlibrary{calc,shapes.callouts,shapes.arrows, chains,shapes.multipart}
\usepackage{xcolor}
\usepackage[T1]{fontenc}

\begin{document}
\begin{frame}[plain]{Caption 1}   
\begin{figure}
\centering
%\begin{tabularx}{\linewidth}{@{}rXX@{}}
\begin{tabular}{rr}
\subfloat[title1]{\includegraphics[height=5cm, width=5.5cm]{figs/dummy_fig}}
\subfloat[title2]{ \includegraphics[height=5cm, width=5.5cm]{figs/dummy_fig}} \tabularnewline
\end{tabular}
%\end{tabularx}
\end{figure}
\end{frame}
\end{document}

enter image description here

EDIT: Alternate version

If \useoutertheme{infolines} is no option, then a brute force method will help, depending on the size of the images, however:

\documentclass[xcolor=dvipsnames, table]{beamer} 
\usetheme{Frankfurt}

\usepackage{framed}
\usepackage{graphicx}
\usepackage{bm, multirow, subfig,tabularx}
\usepackage[]{textpos}
\usepackage{tikz} 
\usetikzlibrary{calc,shapes.callouts,shapes.arrows, chains,shapes.multipart}
\usepackage{xcolor}
\usepackage[T1]{fontenc}

\begin{document}
\begin{frame}[plain]{Caption 1}   
\begin{figure}
\centering
%\begin{tabularx}{\linewidth}{@{}rXX@{}}
\begin{tabular}{rr}
\hspace{-0.5cm}%
\subfloat[title1]{\includegraphics[height=5cm, width=5.5cm]{figs/dummy_fig}}
\subfloat[title2]{ \includegraphics[height=5cm, width=5.5cm]{figs/dummy_fig}} \tabularnewline
\end{tabular}
%\end{tabularx}
\end{figure}
\end{frame}
\end{document}

As far as I know, the once chosen beamer theme in the beginning can not be changed somewhere later on, except from colour/font settings. This, however, does not effect the layout issue with outertheme infolines etc.