# Customize the position of a figure [duplicate]

Hello although this question has been asked several times, I still can't position my figures at the right place. I have installed the float and the here packages. and the code is as follow:

\begin{figure}[H]
\centering
\includegraphics[scale=0.7]{pictures/pic.png}
\caption{The Pulse Co-Oxymetrie}
\label{fig: Massimo}
\end{figure}


even though there is more than enough space left for the image,a new page is created and the figure goes at the top of this new page,while the caption stays at the bottom meaning I have a lot of blank spaces in my thesis.

-
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. (In general, if there is space the figure will fit, certainly with H, so we need to see what is going on.) –  Joseph Wright Feb 21 at 13:55
If you use H (don't:-) then there is no positioning happening at all the construct is just a big minipage and comes exactly where you put it. Typically it won't fit so it will have to go on the next page leaving a big gap. That is why latex has a float positioning algorithm to move floats to avoid the gaps. But [H] turns that off. –  David Carlisle Feb 21 at 14:03
use \frame{\includegraphics[scale=0.7]{pictures/pic.png}} which will put a visible border around the image. If the white space is inside that border it is part of the image so you should crop your image in an image editor before including it. –  David Carlisle Feb 21 at 14:07
@ David Carlisle i don't quite seem to understand what u mean in your comment about the [H] could you please give a concrete example? –  Joly Feb 21 at 15:18
This seems to come down to the 'controlling position of floats' question: certainly without a full MWE it's not going to get a better answer. –  Joseph Wright Aug 8 at 12:34

## marked as duplicate by Joseph Wright♦Aug 8 at 12:33

I usually put pictures into a raisebox environment. This way, you can adjust the image vertically on the page easily. Without more specifics as to your problem, it is difficult for me to give you a better answer. Maybe this will help anyway!

Here is a basic example +2 cm lowers the image, -2 cm raises the image:

\raisebox{-2cm}{\includegraphics[width=3cm]{portrait}}


Here is an example inside of a minipage environment:

\begin{minipage}[t]{.4\textwidth}
\begin{flushright}
\raisebox{-2cm}{\includegraphics[width=3cm]{portrait}}
\end{flushright}
\end{minipage}


UPDATE: As Marco Daniel notes in the comments below, you should probably write:

\begin{minipage}[t]{.4\textwidth}
\flushright
\raisebox{-2cm}{\includegraphics[width=3cm]{portrait}}
\end{minipage}

-
Inside minipage you don't need an extra environment. Instead you should use \flushright –  Marco Daniel Feb 24 at 8:08
I am not sure what you mean. You don't need anything. It all depends on what you're trying to do. In this case, it is for a CV with the portrait on the right side of the page and the contact info on the same line on the left side of the page. –  macmadness86 Feb 24 at 9:29
Please see: tex.stackexchange.com/questions/23650/… –  Marco Daniel Feb 24 at 9:37
Ah, I see what you mean now. Thank you for getting back to me! –  macmadness86 Feb 24 at 9:44