[Tex/LaTex] How to make figure fit the slide in a latex beamer

beamergraphics

\documentclass{beamer}
%
% Choose how your presentation looks.
%
% For more themes, color themes and font themes, see:
% http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html
%
\mode<presentation>
{
  \usetheme{default}      % or try Darmstadt, Madrid, Warsaw, ...
  \usecolortheme{default} % or try albatross, beaver, crane, ...
  \usefonttheme{default}  % or try serif, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
  \setbeamertemplate{footline}[frame number]
} 

\usepackage[english]{babel}
\usepackage{bm}
\usepackage{graphicx}
\usepackage[utf8x]{inputenc}
\begin{document}

\begin{frame}{Densities in ASK2ME}
\includegraphics[width = \textwidth]{pic1.png}
\\
\end{frame}

\end{document}

I am new to latex beamer and would like to insert some images into my slides. I am using \includegraphics[width = \textwidth]{pic1.png} which resizes the pic1 to fit my slide. But I still think it's a bit too small and I want it to take up more of the space on the slide.

I've also tried \includegraphics[scale = ?]{pic1.png} and experimented with different numbers but I couldn't find one that is big enough to fit the slide but not big enough so that some of the figure goes off the slide.

Is there a way to make the figure take up more space in the slide?

Best Answer

The following answer also includes some of the content of Alan Munns comments -> made it a community wiki answer.

If you think \includegraphics[width = \textwidth]{pic1.png} is too small, you can increase the size, for example \includegraphics[width = 1.1\textwidth]{pic1}.

However ever value bigger then 1.0\textwidth will cause the image to protrude into the margin and will most likely be positioned off centre.


Some other remarks:

  • you can omit the file type in \includegraphics[width = \textwidth]{pic1}, in fact this has the advantage that now automatically the preferred file type is chosen if there are multiple versions with the same name.

  • you don't need graphicx with beamer, as beamer already provides this functionality.

  • If you use \\ outside of a tabular, they are probably either unnecessary or wrong. Try not to use them.

  • Don't use utf8x, see utf8x vs. utf8 (inputenc)

Related Question