[Tex/LaTex] How to reference the whole figure with subfig

cross-referencingsubfloats

I'm using the subfig package in the following way:

Samples of our recordings are shown in the Figure XXXXX. 
\begin{figure}
\centering
\subfloat[`One']{\includegraphics[width=8cm]{One.eps} \label{fig:One}}\qquad
\subfloat[`Two']{\includegraphics[width=8cm]{Two.eps} \label{fig:Two}}\\
\subfloat[`Three']{\includegraphics[width=8cm]{Three.eps} \label{fig:Three}}\\
\parbox{15cm}{\vspace{0.4cm}
\caption{The caption goes here.}}
\end{figure}

I'd like to have the XXXXX replaced with something like \ref{fig:TheWholeFigure}, so that I can refer to the whole figure, e.g. "Figure 3" (and not each part e.g. "Figure 3b").

How could I achieve this?

Best Answer

Just found a solution:

Stick the label for the whole figure inside the caption environment.

It doesn't seem to work anywhere else. E.g. it can't be after the caption, inside the parbox, or after the parbox, inside the figure environment. I'm not sure about the logic behind this.

Related Question