<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><tt>Le 10/04/2019 à 01:24, Federico Miyara a écrit :</tt><tt><br>
</tt></p>
<blockquote type="cite"
cite="mid:9d81a753-e448-2621-b7f5-683c5d0a03d4@fceia.unr.edu.ar">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<tt> </tt><tt><br>
</tt> <tt>Antoine,<br>
<br>
Thank you for your suggestion. It's a good one, but I still
don't know the reason why the index of the current entity is 1
(my question was not really about workarounds but reasons).
Stéphane said it was a stack, but as far as I could find, there
is no stack structure in Scilab 6.</tt></blockquote>
<p><tt>It was an image. The graphics objects tree is not built at
the interpreter level but internally with, at the end, Java
objects. In <br>
</tt></p>
<p><tt>modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/graphicObject/GraphicObject.java<br>
</tt></p>
<p><tt>you can see that the set of children of a graphic object is a
(Java) list<br>
</tt></p>
<p><tt> /** Child objects list. Known by their UID */<br>
private List <Integer> children;<br>
</tt></p>
<p><tt>When a children is added to a graphic object, the the method
"</tt><tt>addChild" is invoked. In the source you can see <br>
</tt></p>
<p><tt> public void addChild(Integer child) {<br>
children.add(0, child);<br>
}</tt></p>
<p><tt>Which is coherent with the actual behavior i.e. news children
are pushed on the top.</tt></p>
<p><tt>What you would like is simply (without the 0)<br>
</tt></p>
<p><tt> public void addChild(Integer child) {<br>
children.add(child);<br>
}</tt></p>
<p><tt>If I have time I can see if it breaks other things, but I am
almost sure that it will...</tt></p>
<p><tt>S.<br>
</tt></p>
<tt>
</tt>
<p><br>
</p>
<blockquote type="cite"
cite="mid:9d81a753-e448-2621-b7f5-683c5d0a03d4@fceia.unr.edu.ar"><tt>
<br>
</tt><tt><br>
</tt>
<div class="moz-cite-prefix"><tt>On 09/04/2019 04:22, Antoine
Monmayrant wrote:</tt><tt><br>
</tt> </div>
<blockquote
cite="mid:d458a9fc-736e-a15b-8d9a-c7b47df4c4bf@laas.fr"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div class="moz-cite-prefix"><tt>Hello,</tt></div>
<div class="moz-cite-prefix"><tt><br>
</tt> </div>
<div class="moz-cite-prefix"><tt>As Stéphane said, using a tag
and findobj is a possibility that I use for complex layouts.</tt><tt><br>
</tt><tt> Here is another one: build your own vector of
handles that you order the way you want:</tt></div>
<div class="moz-cite-prefix"><tt><br>
</tt> </div>
<div class="moz-cite-prefix"><tt>as=[];</tt><tt><br>
</tt> </div>
<div class="moz-cite-prefix"><tt>subplot(221)</tt></div>
<div class="moz-cite-prefix"><tt>plot(1,2)</tt></div>
<div class="moz-cite-prefix"><tt>as=[as,gca()]</tt><tt><br>
</tt> </div>
<div class="moz-cite-prefix"><tt>subplot(222)</tt><tt><br>
</tt> </div>
<div class="moz-cite-prefix"><tt>plot(1:2,2:3)</tt></div>
<div class="moz-cite-prefix"><tt>as=[as,gca()]</tt></div>
<div class="moz-cite-prefix"><tt>subplot(223)</tt></div>
<div class="moz-cite-prefix"><tt>plot(2*[1:2],2:3)</tt></div>
<div class="moz-cite-prefix"><tt>as=[as,gca()]</tt></div>
<div class="moz-cite-prefix"><tt>subplot(224)</tt></div>
<div class="moz-cite-prefix"><tt>plot(2*[1:2],-[2:3])</tt></div>
<div class="moz-cite-prefix"><tt>as=[as,gca()]</tt></div>
<div class="moz-cite-prefix"><tt>as.foreground=color('gray');</tt></div>
<div class="moz-cite-prefix"><tt>as.background=color('lightgray');</tt></div>
<div class="moz-cite-prefix"><tt>as.thickness=2;</tt></div>
<div class="moz-cite-prefix"><tt>as.font_size=4;</tt></div>
<div class="moz-cite-prefix"><tt><br>
</tt> </div>
<div class="moz-cite-prefix"><tt>Cheers,</tt></div>
<div class="moz-cite-prefix"><tt><br>
</tt> </div>
<div class="moz-cite-prefix"><tt>Antoine</tt><tt><br>
</tt> </div>
<div class="moz-cite-prefix"><tt><br>
</tt> </div>
<div class="moz-cite-prefix"><tt>Le 09/04/2019 à 08:30, P M a
écrit :</tt><tt><br>
</tt> </div>
<blockquote type="cite"
cite="mid:CACf7ODu3xxFM9CSt-zpkXSPrfWg=TAQyv-_+=nN67FQZNF0V0A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<div dir="ltr">
<div><tt>Federico...thanks for asking the question.</tt></div>
<div><tt>I was wondering about it myself for quite some
time.</tt></div>
<div><tt>Once recognizing the fact, I just accepted that new
entities are placed at the first position.</tt></div>
<div><tt>However, it might be interesting to get some
insight of why it is like this....for now I guessed it
has to do with how to handle memory.</tt></div>
<div><tt><br>
</tt> </div>
<div><tt>Philipp </tt></div>
<div><tt><br>
</tt> </div>
</div>
<tt><br>
</tt>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr"><tt>Am Mo., 8. Apr. 2019
um 23:01 Uhr schrieb Stéphane Mottelet <</tt><tt><a
href="mailto:stephane.mottelet@utc.fr"
moz-do-not-send="true">stephane.mottelet@utc.fr</a></tt><tt>>:</tt><tt><br>
</tt> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div bgcolor="#FFFFFF">
<p><tt>Le 08/04/2019 à 22:56, Federico Miyara a écrit :</tt><tt><br>
</tt> </p>
<blockquote type="cite"> <tt><br>
</tt> <tt>Stéphane,<br>
<br>
Sometimes one just needs to extract some parameter
from an entity and indexing is a valid way to access
it.<br>
</tt></blockquote>
<p><tt>So what is your problem since you know that the
order of entities is, though not natural,
reproductible ? If you really need to recover a
deeply hidden entity, use tags and the findobj()
function.</tt></p>
<p><tt>S.<br>
</tt></p>
<blockquote type="cite"><tt> <br>
Federico<br>
<br>
</tt><tt><br>
</tt>
<div
class="gmail-m_-570024488477070350moz-cite-prefix"><tt>On
08/04/2019 12:18, Stéphane Mottelet wrote:</tt><tt><br>
</tt> </div>
<blockquote type="cite">
<p><tt>Hello,</tt><tt><br>
</tt> </p>
<div
class="gmail-m_-570024488477070350moz-cite-prefix"><tt>Le
07/04/2019 à 10:13, Federico Miyara a écrit :</tt><tt><br>
</tt> </div>
<blockquote type="cite"> <tt><br>
</tt> <tt>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:</tt><tt><span style="color:rgb(0,0,0)"><br>
<br>
</span></tt><tt><span style="color:rgb(0,0,0)">scf</span></tt><tt><span
style="color:rgb(74,85,219)">(</span></tt><tt><span
style="color:rgb(188,143,143)">1</span></tt><tt><span
style="color:rgb(74,85,219)">)</span></tt><tt>
</tt><tt><br>
</tt> <tt><span style="color:rgb(0,0,0)">clf</span></tt><tt><span
style="color:rgb(74,85,219)">(</span></tt><tt><span
style="color:rgb(188,143,143)">1</span></tt><tt><span
style="color:rgb(74,85,219)">)</span></tt><tt>
</tt><tt><span style="color:rgb(50,185,185)"><br>
<br>
</span></tt><tt><span
style="color:rgb(75,149,50);font-style:italic">//
Plot a simple two-point graph <br>
</span></tt><tt><span
style="color:rgb(50,185,185)">plot2d</span></tt><tt><span
style="color:rgb(74,85,219)">(</span></tt><tt><span
style="color:rgb(74,85,219)">[</span></tt><tt><span
style="color:rgb(188,143,143)">0</span></tt><tt><span
style="color:rgb(0,0,0)">,</span></tt><tt> </tt><tt><span
style="color:rgb(188,143,143)">1</span></tt><tt><span
style="color:rgb(74,85,219)">]</span></tt><tt><span
style="color:rgb(0,0,0)">,</span></tt><tt> </tt><tt><span
style="color:rgb(74,85,219)">[</span></tt><tt><span
style="color:rgb(188,143,143)">0</span></tt><tt><span
style="color:rgb(0,0,0)">,</span></tt><tt> </tt><tt><span
style="color:rgb(188,143,143)">1</span></tt><tt><span
style="color:rgb(74,85,219)">]</span></tt><tt><span
style="color:rgb(74,85,219)">)</span></tt><tt>
</tt><tt><br>
</tt> <tt><span style="color:rgb(0,0,0)">ax</span></tt><tt>
</tt><tt><span style="color:rgb(92,92,92)">=</span></tt><tt>
</tt><tt><span style="color:rgb(0,0,0)">gca</span></tt><tt><span
style="color:rgb(74,85,219)">(</span></tt><tt><span
style="color:rgb(74,85,219)">)</span></tt><tt><br>
</tt> <tt><span style="color:rgb(74,85,219)"></span></tt><tt><br>
</tt> <tt><span
style="color:rgb(75,149,50);font-style:italic">//
Colect plotted data </span></tt><tt><br>
</tt> <tt><span style="color:rgb(0,0,0)">a</span></tt><tt>
</tt><tt><span style="color:rgb(92,92,92)">=</span></tt><tt>
</tt><tt><span style="color:rgb(0,0,0)">ax</span></tt><tt><span
style="color:rgb(92,92,92)">.</span></tt><tt><span
style="color:rgb(170,170,170)">children</span></tt><tt><span
style="color:rgb(74,85,219)">(</span></tt><tt><span
style="color:rgb(188,143,143)">1</span></tt><tt><span
style="color:rgb(74,85,219)">)</span></tt><tt><span
style="color:rgb(92,92,92)">.</span></tt><tt><span
style="color:rgb(170,170,170)">children</span></tt><tt><span
style="color:rgb(92,92,92)">.</span></tt><tt><span
style="color:rgb(170,170,170)">data<br>
</span></tt><tt> </tt><tt><span
style="color:rgb(50,185,185)"></span></tt><tt><br>
</tt> <tt><span style="color:rgb(50,185,185)"></span></tt><tt><span
style="color:rgb(75,149,50);font-style:italic">//
Plot a simple two-point graph <br>
</span></tt><tt><span
style="color:rgb(50,185,185)">plot2d</span></tt><tt><span
style="color:rgb(74,85,219)">(</span></tt><tt><span
style="color:rgb(74,85,219)">[</span></tt><tt><span
style="color:rgb(188,143,143)">0</span></tt><tt><span
style="color:rgb(0,0,0)">,</span></tt><tt> </tt><tt><span
style="color:rgb(188,143,143)">1</span></tt><tt><span
style="color:rgb(74,85,219)">]</span></tt><tt><span
style="color:rgb(0,0,0)">,</span></tt><tt><span
style="color:rgb(74,85,219)">[</span></tt><tt><span
style="color:rgb(188,143,143)">0.5</span></tt><tt><span
style="color:rgb(0,0,0)">,</span></tt><tt> </tt><tt><span
style="color:rgb(188,143,143)">1.5</span></tt><tt><span
style="color:rgb(74,85,219)">]</span></tt><tt><span
style="color:rgb(74,85,219)">)<br>
</span></tt><tt> </tt><tt><br>
</tt> <tt><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></tt><tt>
</tt><tt><span style="color:rgb(92,92,92)">=</span></tt><tt>
</tt><tt><span style="color:rgb(0,0,0)">ax</span></tt><tt><span
style="color:rgb(92,92,92)">.</span></tt><tt><span
style="color:rgb(170,170,170)">children</span></tt><tt><span
style="color:rgb(74,85,219)">(</span></tt><tt><span
style="color:rgb(188,143,143)">1</span></tt><tt><span
style="color:rgb(74,85,219)">)</span></tt><tt><span
style="color:rgb(92,92,92)">.</span></tt><tt><span
style="color:rgb(170,170,170)">children</span></tt><tt><span
style="color:rgb(92,92,92)">.</span></tt><tt><span
style="color:rgb(170,170,170)">data</span></tt><tt>
</tt><tt><span style="color:rgb(0,0,0)"><br>
<br>
</span></tt><tt><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></tt><tt>
</tt><tt><span style="color:rgb(92,92,92)">=</span></tt><tt>
</tt><tt><span style="color:rgb(0,0,0)">ax</span></tt><tt><span
style="color:rgb(92,92,92)">.</span></tt><tt><span
style="color:rgb(170,170,170)">children</span></tt><tt><span
style="color:rgb(74,85,219)">(</span></tt><tt><span
style="color:rgb(188,143,143)">2</span></tt><tt><span
style="color:rgb(74,85,219)">)</span></tt><tt><span
style="color:rgb(92,92,92)">.</span></tt><tt><span
style="color:rgb(170,170,170)">children</span></tt><tt><span
style="color:rgb(92,92,92)">.</span></tt><tt><span
style="color:rgb(170,170,170)">data<br>
<br>
</span></tt><tt>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>
</tt><tt><span style="color:rgb(0,0,0)"> </span></tt><tt><br>
</tt><tt> 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. </tt><tt><br>
</tt> </blockquote>
<p><tt>I would say that the set of children is a
stack, i.e. each new child is "pushed" on top.
Anyway, relying on child order seems, to me, a
bad idea. For example, legend takes as
(optional) first argument an array of handles,
and not an array of child numbers.</tt></p>
<p><tt>S.</tt><tt><br>
</tt> </p>
<blockquote type="cite"> <tt><br>
</tt><tt> Regards,</tt><tt><br>
</tt> <tt><br>
</tt><tt> Federico Miyara</tt><tt><br>
</tt> <tt><br>
</tt>
<div
id="gmail-m_-570024488477070350DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><tt><br>
</tt>
<table
style="border-top-color:rgb(211,212,222);border-top-width:1px;border-top-style:solid">
<tbody>
<tr>
<td style="width:55px;padding-top:18px"><tt><a
href="https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
target="_blank"
moz-do-not-send="true"><img
style="width: 46px; height: 29px;"
alt=""
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif"
moz-do-not-send="true" width="46"
height="29"></a></tt></td>
<td style="width: 470px; color: rgb(65,
66, 78); line-height: 18px; padding-top:
17px; font-size: 13px;"><tt>Libre de
virus. </tt><tt><a
style="color:rgb(68,83,234)"
href="https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
target="_blank"
moz-do-not-send="true">www.avast.com</a></tt>
</td>
</tr>
</tbody>
</table>
<tt><a
href="#m_-570024488477070350_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"
height="1" width="1" moz-do-not-send="true">
</a></tt></div>
<tt><br>
</tt>
<fieldset
class="gmail-m_-570024488477070350mimeAttachmentHeader"></fieldset>
<pre class="gmail-m_-570024488477070350moz-quote-pre">_______________________________________________
users mailing list
<a class="gmail-m_-570024488477070350moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org" target="_blank" moz-do-not-send="true">users@lists.scilab.org</a>
<a class="gmail-m_-570024488477070350moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users" target="_blank" moz-do-not-send="true">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<tt><br>
</tt>
<fieldset
class="gmail-m_-570024488477070350mimeAttachmentHeader"></fieldset>
<tt><br>
</tt>
<pre>_______________________________________________
users mailing list
<a class="gmail-m_-570024488477070350moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org" target="_blank" moz-do-not-send="true">users@lists.scilab.org</a>
<a class="gmail-m_-570024488477070350moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<tt><br>
</tt> <tt><br>
</tt>
<fieldset
class="gmail-m_-570024488477070350mimeAttachmentHeader"></fieldset>
<pre class="gmail-m_-570024488477070350moz-quote-pre">_______________________________________________
users mailing list
<a class="gmail-m_-570024488477070350moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org" target="_blank" moz-do-not-send="true">users@lists.scilab.org</a>
<a class="gmail-m_-570024488477070350moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users" target="_blank" moz-do-not-send="true">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
</div>
<tt> _______________________________________________</tt><tt><br>
</tt><tt> users mailing list</tt><tt><br>
</tt> <tt><a href="mailto:users@lists.scilab.org"
target="_blank" moz-do-not-send="true">users@lists.scilab.org</a></tt><tt><br>
</tt> <tt><a
href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users"
target="_blank" rel="noreferrer"
moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a></tt><tt><br>
</tt> </blockquote>
</div>
<tt><br>
</tt>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<p><tt><br>
</tt> </p>
<pre class="moz-signature" cols="72">--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Antoine Monmayrant LAAS - CNRS
7 avenue du Colonel Roche
BP 54200
31031 TOULOUSE Cedex 4
FRANCE
<a class="moz-txt-link-freetext" href="Tel:+33">Tel:+33</a> 5 61 33 64 59
email : <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:antoine.monmayrant@laas.fr">antoine.monmayrant@laas.fr</a>
permanent email : <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:antoine.monmayrant@polytechnique.org">antoine.monmayrant@polytechnique.org</a>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
</pre>
<tt><br>
</tt>
<fieldset class="mimeAttachmentHeader"></fieldset>
<tt><br>
</tt>
<pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org" moz-do-not-send="true">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<tt><br>
</tt> <tt><br>
</tt>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>