Firstly, the examples...
Now the distances...
A k-distance plot displays, for a given value of k, what the distances are from all points to the kth nearest. These are sorted and plotted.
For k = 2, which is equivalent to the nearest neighbour, the nearest distances for each id are
The plot looks like this
The smallest value is to the right rather than starting at the left near the origin.
These plots can be used to determine choices for the epsilon parameter in the DBScan clustering operator.
Some more notes about this to follow...