title: Are `Children` generally in the reversed order? Matlab
body: <p>I have a figure as shown here, with each color indicating the value of a third variable. I attempted to create a <code>colorbar</code> with the corresponding colors and values. For this purpose first I <code>get</code> the <code>Color</code> of the <code>'Children'</code> of the axes as follows:</p>
  
  <pre><code>curves = get(gca, 'Children');
  mycolorset = cat(1, curves(:).Color);
  </code></pre>
  
  <p>Then I realized that the order of the colors (same as the order of the <code>Children</code>) is reversed compared to the order of plotting. So I had to apply <code>flipud</code> to the colors to make the correct colormap:</p>
  
  <pre><code>set(gcf, 'Colormap', flipud(mycolorset));
  </code></pre>
  
  <p>Interesting fact is that <em>Plot Browser</em> shows the curves in the correct order.</p>
  
  <p>Now I want to know, is this a universal feature of all <code>Children</code> in Matlab to be reversed? Do you know a case that this becomes useful at all?</p>
  
  <p><a href="https://i.stack.imgur.com/6Xoh6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Xoh6.png" alt="enter image description here"></a></p>