Beamer – How to Left-align Figures in Beamer

beamerfloatsminipage

I use the minipage environment and I've got two figures, which I wish to present side by side. I have successfully done that, but I do not like the position of the image on the left. I would prefer to have it slightly shifted to the left.

Here is my code:

    \documentclass{beamer}
    
    \usepackage{pgfbaseimage}
    \usepackage{graphicx}
    \usepackage{tikz}
    
    \begin{document}
    
    \begin{frame}{some text}
    
    \begin{figure}
        \centering
        
        \begin{minipage}{0.49\textwidth}
        \centering
        \includegraphics[width=0.4\textwidth]{figs/1.png}
        \end{minipage}
        \hfill
        \begin{minipage}{0.49\textwidth}
        \includegraphics[width=0.4\textwidth]{figs/2.png}
        \end{minipage}
        
    \end{figure}
     
    \end{frame}
    
    \end{document}

Which gives:

I want to use these white spaces

So I'd need to shift my figures to the edges of the slide, so I can have a space for annotations. It doesn't matter here with the example image, but with my bigger figures, it does.

update 1: solution with \raggedleft and right

enter image description here

update 2: executing solution 1 as it is

enter image description here

Best Answer

In your code, you ask for the image to be centered in your minipage. If you'd rather have it left-aligned, try this:

\documentclass{beamer}
\usepackage{graphicx}

\begin{document}
\begin{frame}{some text}
    \begin{figure}
        \centering
        \begin{minipage}{\textwidth}
            \includegraphics[width=0.33\textwidth]{example-image-a}
            \hfill
            \includegraphics[width=0.33\textwidth]{example-image-b}
        \end{minipage}
    \end{figure}
\end{frame}
\end{document}