# reference to figures in the appendix is not correct in REVTEX [duplicate]

I would appreciate any help with a problem that I have with reference to figures in my appendix. For example, instead of (Fig. A.1 ), I only get (Fig. A). I read all the previous posts but they did not help me. According to a previous post, I even added

\renewcommand\thesection{\Alph{section}}
\renewcommand{\thefigure}{\thesection.\arabic{figure}}


after the \appendix command, but that did not help either. Here is the minimal code I use:

\documentclass[reprint,
amsmath,amssymb,
aps,
]{revtex4-1}

\section{AAA}\label{AAA}
Blah blah Fig. \ref{xyz}  blah blah.

\appendix
\section{ BBB}\label{BBB}

\begin{figure}
\begin{center}
\includegraphics[scale=0.5]{xyz.png}
\caption{blah blah}
\end{center}\label{xyz}
\end{figure}

• Welcome to TeX.SX! Change \begin{center} into \centering and remove \end{center}. – egreg Jun 16 '15 at 16:53
• The question is a duplicate; in the linked question the centering environment was used, but the problem is just the same. – egreg Jun 16 '15 at 17:02
• Thank you so much, @Gonzalo Medina. The problem is now solved. – user101464 Jun 17 '15 at 17:22