<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<font face="Courier New">Dear all,<br>
<br>
I would like to know if there is a reason for the fact that
whenever new graphic objects are added to an axes, the last one
that has been created is always the one with index 1 instead of
n+1 (where n is the number of objects prior to new one).<br>
<br>
Example:</font><span style="color:rgb(0,0,0);"><br>
<br>
</span><span style="color:rgb(0,0,0);">scf</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(74,85,219);">)</span>
<br>
<span style="color:rgb(0,0,0);">clf</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(50,185,185);"><br>
<br>
</span><span style="color:rgb(75,149,50);font-style:italic;">// Plot
a simple two-point graph <br>
</span><span style="color:rgb(50,185,185);">plot2d</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(74,85,219);">[</span><span
style="color:rgb(188,143,143);">0</span><span
style="color:rgb(0,0,0);">,</span> <span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(74,85,219);">]</span><span
style="color:rgb(0,0,0);">,</span> <span
style="color:rgb(74,85,219);">[</span><span
style="color:rgb(188,143,143);">0</span><span
style="color:rgb(0,0,0);">,</span> <span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(74,85,219);">]</span><span
style="color:rgb(74,85,219);">)</span>
<br>
<span style="color:rgb(0,0,0);">ax</span> <span
style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(0,0,0);">gca</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(74,85,219);">)</span><br>
<span style="color:rgb(74,85,219);"></span><br>
<span style="color:rgb(75,149,50);font-style:italic;">// Colect
plotted data </span><br>
<span style="color:rgb(0,0,0);">a</span> <span
style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(0,0,0);">ax</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">children</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">children</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">data<br>
</span> <span style="color:rgb(50,185,185);"></span><br>
<span style="color:rgb(50,185,185);"></span><span
style="color:rgb(75,149,50);font-style:italic;">// Plot a simple
two-point graph <br>
</span><span style="color:rgb(50,185,185);">plot2d</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(74,85,219);">[</span><span
style="color:rgb(188,143,143);">0</span><span
style="color:rgb(0,0,0);">,</span> <span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(74,85,219);">]</span><span
style="color:rgb(0,0,0);">,</span><span
style="color:rgb(74,85,219);">[</span><span
style="color:rgb(188,143,143);">0.5</span><span
style="color:rgb(0,0,0);">,</span> <span
style="color:rgb(188,143,143);">1.5</span><span
style="color:rgb(74,85,219);">]</span><span
style="color:rgb(74,85,219);">)<br>
</span> <br>
<span style="color:rgb(0,0,0);"><span
style="color:rgb(75,149,50);font-style:italic;">// Colect
plotted data corresponding to index 1</span><br>
<span style="color:rgb(0,0,0);"></span>b</span> <span
style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(0,0,0);">ax</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">children</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">children</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">data</span>
<span style="color:rgb(0,0,0);"><br>
<br>
</span><span style="color:rgb(0,0,0);"><span
style="color:rgb(0,0,0);"><span
style="color:rgb(75,149,50);font-style:italic;">// Colect
plotted data corresponding to index 2</span><br>
<span style="color:rgb(0,0,0);"></span></span>c</span> <span
style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(0,0,0);">ax</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">children</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">2</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">children</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">data<br>
<br>
</span><font face="Courier New">After the first plot we get <br>
<br>
a = <br>
0. 0.<br>
1. 1.<br>
<br>
After the second plot we get<br>
<br>
b = <br>
0. 0.5<br>
1. 1.5<br>
<br>
c = <br>
<br>
0. 0.<br>
1. 1.<br>
</font><span style="color:rgb(0,0,0);">
</span><br>
I would expect that b = a, i.e, once a children object has been
created on the axes, it would be reasonable that its index were kept
constant. The current behavior is as if each new object were
inserted in the structure before the previous one instead of after
it. <br>
<br>
Regards,<br>
<br>
Federico Miyara<br>
<br>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /> <table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 18px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 17px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Libre de virus. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a> </td>
</tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>