Possible Duplicate:
Two figures side by side
Subfigures placed horizontally

I want to place two figures side by side in my document. I am using the subcaption package and my code is as follows

\documentclass[a4paper, 12pt, notitlepage]{report}
\usepackage{amsfonts} % if you want blackboard bold symbols e.g. for real numbers
\usepackage{graphicx} % if you want to include jpeg or pdf pictures

    \caption{Effort levels in round one and two with varying $\mu$. $\alpha=1$, $v=0.25$ and $w=0.25$}

For some reason my two pictures get put on top of each other. Does anybody know why this may be the case?

marked as duplicate by cmhughes, diabonas, Andrew Swann, yo', Martin Schröder Jan 10 '13 at 23:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    This is a very common problem; write\end{subfigure}% for the first subfigure. See tex.stackexchange.com/a/37597/4427 – egreg Jan 10 '13 at 19:13
  • you give .5\textwidth to each figure. Unfortunately this not always adds 1\textwidth, due to rounding errors or other skips (for example newlines which are seen as spaces by tex). Better give some margin for error using .49\textwidth – JLDiaz Jan 10 '13 at 19:14
  • 1
    @JLDiaz Rounding errors don't play role in this case, due to \hfuzz. – yo' Jan 10 '13 at 19:15
  • @Alex Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – yo' Jan 10 '13 at 19:16
  • @JLDiaz No, it's definitely not a rounding error problem, but it is due to the space caused by the new line. – egreg Jan 10 '13 at 19:17