# Large image should ocupy all page without blank space around

I'm new to LaTeX and although my supervisor does not use LaTeX, I've decided to do my master thesis in LaTeX.

However, I'm having a problem with the images. I have big images generated through R. They have some white space around but I manually removed the white space. Nevertheless, I've tried a lot of different examples found in the Internet and none resolve the issue. To better understand the problem, I attach a print screen of the image in the middle of the page.

The image is quite large itself but I think that if I was able to put max width of the page, one will be able to see the picture. Here is the picture alone

The code used is the following:

\begin{figure}
\centering
\includegraphics[max size={\textwidth}{\textheigth}]{../Files/PMM/densityplotVac.png}
%\includegraphics[width=1.2 \textwidth ,keepaspectratio]{../Files/PMM/densityplotVac.png}
\end{figure}


If any one was any pointer, I would be very grateful. Thank you very much

-
+1 for although my supervisor does not use LaTeX, I've decided to do my master thesis in LaTeX –  Harish Kumar Jun 15 '14 at 12:44

You can use the float-package for positioning the image.

\documentclass{article}

\usepackage{graphicx}
\usepackage{float}
\usepackage{blindtext}

\begin{document}

\blindtext

\begin{figure}[H]
\includegraphics[width=\textwidth]{image.png}
\caption{Kernel density estimates ...}
\end{figure}

\blindtext

\end{document}


-
Thank you! It worked! It seems so simple and I wasn't able to figure it out. Before the [H] I had [h!]. So the main issue was the lack of the package float? –  pavid Jun 15 '14 at 10:57

Try setting the width of the image to the \textwidth, which is the width of the area with text in it:

\begin{figure}
\centering
\includegraphics[width=\textwidth]{../Files/PMM/densityplotVac.png}
\end{figure}


The trick is in setting the actual width of the image rather than the maximum size.

-
Thank you! It worked! I also added the package float like suggested in the other comment –  pavid Jun 15 '14 at 10:58