If your document uses custom margins (e.g., via the geometry package) and you want your graphics to span the full paper width (ignoring the text block width), you need to place the images so that they extend into the margin areas.
By default, \linewidth inside a figure environment corresponds to the width of the text block, not the full paper width.
How to make your figure span the full paper width
You can use \makebox or \noindent\hspace*{-<left margin>} tricks, or better, use the adjustwidth environment from the changepage package or \begin{figure*} (if using two-column mode).
But the simplest way is:
-
Use \noindent\makebox[\textwidth][c]{...} with \includegraphics of width \paperwidth (or \dimexpr\paperwidth-2in if you want to exclude 1 inch margins).
-
Or use \includegraphics[width=\paperwidth]{...} but then you need to shift the figure left by the left margin.
Example solution
Assuming you want three images side-by-side spanning the full paper width, you can do:
\begin{figure}[H]
\noindent\makebox[\textwidth][c]{%
\includegraphics[width=0.32\paperwidth]{img/algo/times/rollwindow_2+5+10+50+100-norm_zscore-logs_tfidf-oversmpl_no_fit_time.png}%
\hfill
\includegraphics[width=0.32\paperwidth]{img/algo/times/rollwindow_2+5+10+50+100-norm_zscore-logs_tfidf-oversmpl_no_pred_time.png}%
\hfill
\includegraphics[width=0.32\paperwidth]{img/algo/times/rollwindow_2+5+10+50+100-norm_zscore-logs_tfidf-oversmpl_no_samples_per_second.png}%
}
\caption{Training latency (left), Inference latency (middle) and Throughput (right) of all algorithms}
\label{fig:times}
\end{figure}
Explanation
-
\makebox[\textwidth][c]{...} centers the content in the text width, but the images are wider than the text width, so they will overflow into the margins.
-
Using width=0.32\paperwidth makes each image about 1/3 of the full paper width.
-
\hfill spaces them evenly.
Alternative: Using adjustwidth from changepage
If you want to temporarily remove the margins for the figure:
\usepackage{changepage} % in preamble
...
\begin{figure}[H]
\begin{adjustwidth}{-<left margin>}{-<right margin>}
\centering
\includegraphics[width=0.32\linewidth]{...}
\hfill
\includegraphics[width=0.32\linewidth]{...}
\hfill
\includegraphics[width=0.32\linewidth]{...}
\end{adjustwidth}
\caption{...}
\label{fig:times}
\end{figure}
Replace <left margin> and <right margin> with your actual margin sizes (e.g., 1in).
Summary
- Use
width=0.32\paperwidth instead of \linewidth.
- Wrap images in a box that allows overflow into margins.
- Optionally use
changepage's adjustwidth to temporarily remove margins.
If you want me to tailor the code to your exact margin setup, please share your margin settings (e.g., your geometry package options).