[Tex/LaTex] Figure appears in bibliography

floats

i used all possible options for the figure placement [h], [!h], [ht], [htb]
and the figure always appears in the middle of the bibliography, since the figure is near the end of the paper.

is there an option to "flush" everything before the bibliography?

So it would even look something like

[NEW PAGE]
bla bla bla
[some vertical space]
[NEW PAGE]
[figure]
bibliography

because now it looks like:

[NEW PAGE]
bla bla bla
bibliograhy
[NEW PAGE]
[figure]
bibliography (continuing)

Best Answer

The simplest way to flush floats is \clearpage which outputs all floats (potentially on new pages) and afterwards starts a new page.

If a new page is not desired then the use of the package placeins will help. It offers a command \FloatBarrier that forces floats to be placed before further text will be typeset. It offers some finer control through package options.

Also something like [!t]might help (which was not listed in your placement options you tried), as it turns off some of the restrictions for placing the current float on the top of the page.