[Tex/LaTex] How to put figures at the end of pdf file

graphics

I'm preparing an article for submission in a journal and it requires that all figures must be coded at the end of the TeX file and not inline. I've tried to use :

\usepackage[markers,figuresonly,nolists]{endfloat}

but it put all figures and tables at the end of the pdf file.
I want to put only figures at the end like this :
example
So how to do so?

The MWE (generated by Lyx) is like this :

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{graphicx}
\usepackage[markers,figuresonly,nolists]{endfloat}
\usepackage{babel}


\begin{document}
Some text here.
\begin{figure}


 \begin{centering}
\includegraphics[scale=0.33]{dwt2}
\par\end{centering}
\caption{1-level DWT of the image of Peppers }
\end{figure}


\begin{table}[th]
\begin{centering}
\begin{tabular}{|c|c|c|c|c|}
\hline 
100 & 100 & 100 & 100 & 100\tabularnewline
\hline 
100 & 100 & 100 & 100 & 100\tabularnewline
\hline 
\end{tabular}
\par\end{centering}

\caption{Comparison.}
\end{table}

\end{document}

Best Answer

The table is at the end just because you have no text after it. If text is added (here I used lipsum for it), the table will be where placed.

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[demo]{graphicx}
\usepackage[markers,figuresonly,nolists]{endfloat}
\usepackage{babel}

\usepackage{lipsum}


\begin{document}
Some text here.

\begin{figure}
\centering
\includegraphics[scale=0.33]{dwt2}
\caption{1-level DWT of the image of Peppers }
\end{figure}

\lipsum[2]

\begin{table}[th]
\centering
\begin{tabular}{|c|c|c|c|c|}
\hline 
100 & 100 & 100 & 100 & 100\tabularnewline
\hline 
100 & 100 & 100 & 100 & 100\tabularnewline
\hline 
\end{tabular}

\caption{Comparison.}
\end{table}

\lipsum

\end{document}

Don't use \begin{centering}, just \centering (of course, remove \par\end{centering}).

enter image description here

Related Question