The interaction forces between the sub-atomic particles are
(i) Electrostatic forces and (ii) Nuclear forces/Strong forces.
The nuclear forces are very large in magnitude compared to electrostatic forces, but they are short distance forces. They only act within the nucleus.
Thus, within the nucleus, the potential is governed by nuclear forces and outside the nucleus, it is governed by the electrostatic forces.
Case 1: Neutron Neutron is a chargeless particle. Thus, outside the nucleus, electrostatic potential energy of neutron is zero.
But, within the nucleus, the nuclear forces (attractive) bind the neutron to the nucleus. Hence potential energy is negative.
Thus, Potential energy of neutron corresponds to figure (1)
Case 2: Proton proton is a positively charged particle. Thus, outside the nucleus, electrostatic forces on the proton are repulsive. Thus, potential energy of proton is positive.
But, within the nucleus, the nuclear forces (attractive) bind the proton to the nucleus. Hence potential energy is negative.
Thus, Potential energy of proton corresponds to figure (2)
Case 3: Electron Electron is a negatively charged particle. Thus, outside the nucleus, electrostatic forces on the electron are attractive. Thus, potential energy of electron is negative.
But, within the nucleus, the nuclear forces and the electrostatic forces are of the same order (since electron is not a intra nuclear particle).
Thus, Potential energy of electron corresponds to figure (3)