After having problem with missing fonts I tried to install EVERYTHING...
apt-get install texlive-full
apt-get install texlive-full
\begin{figure}[h]
\label{fig:foo}
\centering
\includegraphics[scale=0.4]{images/foo.eps}
\caption{blah blah}
\end{figure}
\ref{fig:foo} shows wrong reference!
\begin{figure}[h]
\centering
\includegraphics[scale=0.4]{images/foo.eps}
\caption{blah blah}
\label{fig:foo}
\end{figure}
set term postscript eps color blacktext "Helvetica" 24 set output 'output.eps' plot commands..... set outputRereference: http://snippets.dzone.com/posts/show/1302