# How does one construct a persistence diagram in Persistence Homology

I am learning a bit about persistence homology and was hoping that someone could point me to a systematic explanation of how to construct a persistence diagram, such as the one pictured below. I understand the basic idea of the level sets and the height function. I also understand that the lifespan of a feature corresponds to the local minima and maxima of the function. However, I am not clear how this idea of birth and death of a feature corresponds to a point on the persistence diagram. If the diagonal line on the persistence diagram corresponds to the height of the level set, then how is the distance of the point above the diagonal line computed? That Y-coordinate must have some relation to either the length of the feature or something. Hence, I was looking for a good explanation of how the persistence diagram is created.

As a note, I checked the Edelsbrunner and Harer book, but did not see a persistence diagram that matches the shape of the one below.

Any help would be appreciated.