# Avoid automatic centering of caption [duplicate]

I have in the LaTeX source file:

\usepackage{subcaption}

\captionsetup{compatibility=false}

\begin{figure}

\begin{subfigure}{0.50\textwidth}

\includegraphics[width=0.95\linewidth]{RegressionFixedObservedN4451.png}

\caption{Based on the observed data sets}

\label{fig:RegressionFixedObservedN4451}

\end{subfigure}%

\caption{Regression plot for the fixed condition of the ACT (N = 445). The
x-axis represents the natural logarithm of the absolute value of the minimum
residual score belonging to the sequence of 14 consecutive bars with the
smallest MSE. The y-axis represents the smallest MSE. The top line is the
line $y = 2x + \ln{10}$. The bottom line is the line $y = 2x-\ln{10}$. The
line exactly in between is the line $y=2x$.}

\label{fig:observedfixedcondion}

\end{figure}


and the caption is centered. But I want the caption NOT centered. How should I do this?

• It would be very helpful to have a complete, compileable example document, i.e. with all used packages (are you loading the caption package as well?). Also, which caption are you referring to: the main caption or the one in the subfigure or both? – Martin Scharrer Jan 7 at 12:08
• When I compile your code none of the captions are centered. The subcaption is just indented a little (which makes it looks almost as being centered under the image, but this depends on the image width) and the main caption is justified. Please explain a little better what you require. – Martin Scharrer Jan 7 at 12:14

\captionsetup{justification=raggedright,singlelinecheck=false}