Hi Pawell,
the Position property returns the top left coordinates of the front panel object including its related objects.
If you place the legend above the graph, the Y coordinates refers to the upper position of the legend box rectangle; this is why if you move the legend up and down, the graph position value changes although you are not moving the plot area.
Ask if I haven't been clear enough.
Alberto