I have a contour map in spatstat generated from the intensity function of a point pattern X (like "location of the trees"). Each x,y coordinates in this point pattern is marked with a corresponding third vector (like "diameter of the tree"). -->cf image (of course the vertical lines representing the tree can be omitted)
I would like to display the average of the mark (diameter) in each level of the contour with different colors. Suggestions? Thanks!