I'd like to have one figure floating over another in a subfigure environment. Following the answers already offered here (How to put a PDF figure on top of another one), I managed to place one over the other. However, I found no clue how I could fine adjust the position of a second figure, relative or absolute position. Let's say , I rather like the Legend figure to be positioned 1cm from the right and bottom of the border of Figure 1. How could I set that?

Here is my figure structure:

\subcaptionbox{Figure 1}{
\subcaptionbox{Figure 2}{
\subcaptionbox{Figure 3}{

The following should achieve your goal. Note the use of % in strategic spots to avoid spurious spaces.

enter image description here




  \subcaptionbox{Figure 1}{%


  \subcaptionbox{Figure 2}{%
  \subcaptionbox{Figure 3}{%
  \caption{A figure}


Your use of \medskip in horizontal mode actually puts the space between the two lower images and the \caption. I've changed that to \quad.

For completeness, I've used \makebox[0pt][r] instead of \llap (they achieve the same goal though).

  • I am sorry, but is there any difference between using subfigure environment and \subcaptionbox? – Diaa May 4 '17 at 0:26
  • 1
    @DiaaAbidou: The differences are minimal and may depend on your usage. This paste shows the difference when compiling similar content for a subfigure and a \subcaptionbox. The former doesn't align the first line of the sub-caption with one another, while the second does. – Werner May 4 '17 at 0:50
  • The difference is really noticeable in this case. Thanks for your explanation. – Diaa May 5 '17 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.