[Tex/LaTex] Customly change margins for a figure

floatsmargins

Is there a way to customly change the margins only for a figure? Not for the text. I'd like to widen the margins on both sides, left and right, of the page, and keep the figure in the center.

The code I have is the following:

\begin{figure}[H]
\begin{center}
%\hspace*{-1.5in}
%\makebox[\linewidth]{
\includegraphics[scale=0.41]{result1_mnist_fc_sgd.png}
\includegraphics[scale=0.41]{result2_mnist_conv_sgd.png}
\includegraphics[scale=0.41]{result3_cifar10_sgd.png}
%}
\end{center}
\caption{Results for SGD methods}
\label{fig:NN_example}
\end{figure}

I have 3 \includegraphics in my figure, the first two I want on one line, with a wider margin, and the third image underneath it.

As can be seen in the code, I've tried \makebox and \hspace, but both don't work fine. \hspace works, but then the image is not centered anymore. \makebox puts all images on one line.

Best Answer

If the figure is inserted with \includegraphics, use \makebox[\linewidth]{\includegraphics{myfigure}. It will overflow equally on both sides, but the caption will be limited to the line width.

You also may use \includegraphics[width=\linewidth]{myfigure}, in order to reduce the size of the figure.

Related Question