The frames are medium-angle annular dark-field images, and the chemical identity of each dopant was confirmed by electron energy-loss spectroscopy (EELS). (A) Three frames showing a direct exchange between the brighter (due to its greater scattering contrast) P atom and a C neighbor, with the initial (frame 1), transition (frame 2), and final configurations (frame 3). White and black dashed lines indicate the row of the scanning beam when the exchange happens. Scan speed, 8.4 s per frame. No postprocessing was done. (B) Four frames showing both direct exchange (frames 1 and 2) and SW transition (frames 2 to 4). Scale bars, 2 Å. Scan speed, 0.07 s per frame. A median filter with a 2 pixel × 2 pixel kernel was applied for clarity. The SW transition was captured during EELS acquisition in small subscan windows to enhance the signal-to-noise ratio of the spectra used to identify the dopants and to achieve faster scanning rate frames that can better capture atomic dynamics. (C) Neighboring C atom knocked out by the electron beam, turning a threefold-coordinated P into fourfold-coordinated P. Scan speed, 8 s per frame. No postprocessing was done. (D) P dopant being replaced by a C atom. Scan speed, 4 s per frame. The different image color codings represent different categories: gray represents atom-conserving process, and magenta represents atom-nonconserving process. Blue and red dashed circles in (A) and (B) represent the inequivalent lattice sites of graphene, and the green dashed circles in (C) and (D) indicate the location of the atom that has not been conserved. (E and F) Intentional control over the P direct exchange. The yellow crosses indicate the location where the electron beam was parked for 10 s to purposefully move the P atom by one lattice site. Green and blue dashed circles indicate the two nonequivalent lattices sites of graphene. Insets: The region of interest after applying a Gaussian filter. (G) A schematic plot of the control process, where the electron beam is represented by a green cone focused on the neighbor C atom.