The exchange between kinetic and potential energy occurs at double the frequency of the pendulum swing.
Potential energy is at its maximum (and kinetic energy zero) at the extremes of the swing.
Kinetic energy is at its maximum (and potential energy zero) as the pendulum swings either way through the bottom of its swing.
When air friction is present, the total energy of the pendulum falls - but not at a constant rate. It falls the fastest when the kinetic energy (and speed) is highest.
So in the short term graph we see kinetic energy falling in a series of sloping steps.
In the longer term graph we see how the total energy falls more slowly as there is less of it left. This is called exponential decay.