bug fix in plot tree.ess
changed to median as measure of average tree distance

just to see what happens. Doesn't affect any of the calculations, just
the plotting.