  Let $U^-_q = U^-_q(\mathfrak g)$ be the negative part of the quantum group
associated to a finite dimensional simple Lie algebra $\mathfrak g$, and
$\sigma : \mathfrak g \to \mathfrak g$ be the automorphism obtained from the
diagram automorphism. Let $\mathfrak g^{\sigma}$ be the fixed point subalgebra
of $\mathfrak g$, and put $\underline U^-_q = U^-_q(\mathfrak g^{\sigma})$. Let
$B$ be the canonical basis of $U_q^-$ and $\underline B$ the canonical basis of
$\underline U_q^-$. $\sigma$ induces a natural action on $B$, and we denote by
$B^{\sigma}$ the set of $\sigma$-fixed elements in $B$. Lusztig proved that
there exists a canonical bijection $B^{\sigma} \simeq \underline B$ by using
geometric considerations. In this paper, we construct such a bijection in an
elementary way. We also consider such a bijection in the case of certain affine
quantum groups, by making use of PBW-bases constructed by Beck and Nakajima.
