<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Bonjour,<br>
</p>
<div class="moz-cite-prefix">Le 15/06/2021 à 14:12, CHEZE David
227480 a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:4ad44dd7814d49c987a2d852d313951f@cea.fr">
<div class="WordSection1">
<p class="MsoNormal">Bonjour,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">J’utilise régulièrement newaxes pour des
graphiques avec un second axes des ordonnées selon la nature
des données à représenter, généralement une figure par fenêtre
graphique. J’ai essayé d’utiliser newaxes pour un usage
similaire mais cette fois au niveau de vignettes via subplot
dans une fenêtre de figure graphique mais le nouvel axe ajouté
est tracé en référence à la taille de la fenêtre graphique
entière, pas dans la vignette. Est-ce qu’il y aurait une
méthode pour que newaxes suive la logique des subplot ?</p>
</div>
</blockquote>
<p>Tu peux utiliser des uicontrol de type "Frame" avec un layout de
type "grid". En créant un nouvel axe dans une Frame puis en
enchainant les subplot cela a l'air de marcher comme tu le
voudrais :<br>
</p>
<pre style="font-family:Monospaced;font-style:normal;font-size:12.0;"><span style="color:rgb(0,0,0);">clf</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">f</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">gcf</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(50,185,185);">set</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">f</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">layout_options</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">createLayoutOptions</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">grid</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(74,85,219);">[</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">c</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">createConstraints</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">grid</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span> <span style="color:rgb(100,174,100);font-style:italic;">//Create the constraint for nested uicontrols</span>
<span style="color:rgb(160,32,240);">for</span> <span style="color:rgb(0,0,0);">i</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(188,143,143);">4</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(92,92,92);">-</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(188,143,143);">1</span>
<span style="color:rgb(0,0,0);">u_grid</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">i</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(50,185,185);">uicontrol</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">f</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">style</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">frame</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">constraints</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(0,0,0);">c</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">background</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(74,85,219);">[</span><span style="color:rgb(188,143,143);">1</span> <span style="color:rgb(188,143,143);">1</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><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(160,32,240);">end</span>
<span style="color:rgb(50,185,185);">newaxes</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">u_grid</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(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">subplot</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">2</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);">plot</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(188,143,143);">10</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">subplot</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">plot</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(50,185,185);">cos</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(188,143,143);">10</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(50,185,185);">newaxes</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">u_grid</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">4</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">subplot</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">1</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);">plot</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(188,143,143);">10</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">subplot</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">plot</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(50,185,185);">cos</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(188,143,143);">10</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(74,85,219);">)</span></pre>
<p>Idéalement, pour simplifier, il faudrait que subplot() accepte un
premier parametre optionel qui soit de type Figure ou Frame (comme
newaxes) <br>
</p>
<p>S.<br>
</p>
<blockquote type="cite"
cite="mid:4ad44dd7814d49c987a2d852d313951f@cea.fr">
<div class="WordSection1">
<p class="MsoNormal"> </p>
<p class="MsoNormal">Merci</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:FR"> </span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:FR">David
</span><span style="mso-fareast-language:FR"></span></p>
<p class="MsoNormal"> </p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users-fr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users-fr@lists.scilab.org">users-fr@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/v3?i=WjB4M1dJWGJJMnNGTHV5MuAPDwEdQko7KGyaWIIeme0&r=Skk2OVhvdXl2cm1uOWJtRLRPDrgr4YiCABksjbHu_Gv8eNkcUiMzd6MxV8KbAPI5&f=M2FwZHlGNnU1aUlkc09ZNN6FtQAZUfBH2BoDUjg8Y54xjTPKmO5dyqs07ZteowNquP6uMuprUbbg8UTy9A0VCg&u=http%3A//lists.scilab.org/mailman/listinfo/users-fr&k=CXOq">https://antispam.utc.fr/proxy/v3?i=WjB4M1dJWGJJMnNGTHV5MuAPDwEdQko7KGyaWIIeme0&r=Skk2OVhvdXl2cm1uOWJtRLRPDrgr4YiCABksjbHu_Gv8eNkcUiMzd6MxV8KbAPI5&f=M2FwZHlGNnU1aUlkc09ZNN6FtQAZUfBH2BoDUjg8Y54xjTPKmO5dyqs07ZteowNquP6uMuprUbbg8UTy9A0VCg&u=http%3A//lists.scilab.org/mailman/listinfo/users-fr&k=CXOq</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
<a class="moz-txt-link-freetext" href="http://www.utc.fr/~mottelet">http://www.utc.fr/~mottelet</a>
</pre>
<br>
</body>
</html>