When multiple children are added to a graphics object such as a figure or an axes, the order of the child handles is reversed in the 'Children' property as compared to the order in which those children were added.
For example, if I create an axes and make two line plots on it, I expect the handle of the first line plot to appear before the handle of the second line plot when I query for the 'Children' property using the GET function. Instead this order is reversed.
>> figure>> h = axes;>> h1 = plot(1:10, 1:10, 'b')h1 = 158.0044>> hold on>> h2 = plot(1:10, 2:2:20, 'r')h2 = 159.0039>> get(gca, 'children')ans = 159.0039 158.0044
As can be seen above, the order of child handles is the opposite of the order in which they were added to the axes.
Best Answer