Currently my document labels figures in a continuous manner (figure 1, figure 2, etc.) but references to these same figures have the section, subsection, etc. number in front of it (3.1.1 for a figure in the 3rd section and 1st subsection). I want the references to my figures to number in the same continuous fashion as the figures themselves (i.e. figure 1, figure 2, no matter what section the figures are in). I tried using \counterwithout{figure}{section} and \counterwithout{figure}{subsection} but the 3.1.1 style of figure referencing continues.
Here is a minimum working example that reproduces the problem:
\documentclass{article}
\usepackage{chngcntr}
\counterwithout{figure}{section}
\counterwithout{figure}{subsection}
\usepackage{graphicx}
\begin{document}
\section{section}
\subsection{subsection}
Figure~\ref{fig:foo}
\begin{figure}
\label{fig:foo}
\includegraphics[width=6in]{foo.ps}
\caption{sample text}
\end{figure}
\end{document}
