<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Le 08/07/2021 à 17:06, CHEZE David
227480 a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:bc571252f3c94153ae5e7bbc4228b347@cea.fr">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}pre
{mso-style-priority:99;
mso-style-link:"Préformaté HTML Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}span.PrformatHTMLCar
{mso-style-name:"Préformaté HTML Car";
mso-style-priority:99;
mso-style-link:"Préformaté HTML";
font-family:Consolas;}span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}ol
{margin-bottom:0cm;}ul
{margin-bottom:0cm;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Bonjour
Samuel,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Merci
de signaler cette évolution, cela simplifie effectivement
les subplot en lien avec uicontrol frame.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Dans
mon cas, le besoin initial est de pouvoir faire (aussi
simplement que possible dans l’idéal) des graphiques avec
plusieurs axes (avec newaxes ) dans chaque vignette subplot
sans avoir à passer explicitement par la création d’un
quadrillage uicontrol. En gros il faudrait que newaxes() par
défaut récupère un ‘handle’ h correspondant au dernier appel
à h=subplot(mnp) et s’inscrive dans ce cadre (h=subplot(mnp)
parent de newaxes que ce soit par défaut newaxes() ou en
donnant la possiblité à newaxes(subplot(mnp)) de récupérer
une indication sur la parenté que l’on souhaite créer). Je
ne m’étais jamais intéressé de près aux uicontrol, cela
permet de faire ce que je veux mais cela reste lourd à
écrire.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">David</span></p>
</div>
</blockquote>
<p><br>
</p>
<p>Le "problème" est que lorsque subplot cible un carreau coïncidant
avec un repère déjà existant, il rend celui-ci actif au lieu d'en
définir un nouveau superposé. C'est évidemment délibéré. Mais ce
comportement pourrait être modifié par une option subplot(i,j,k,
"new"). En cas de superposition exacte détectée, le nouveau repère
pourrait alors d'emblée être créé avec<br>
</p>
<ul>
<li>.filled="off"</li>
<li>des marges identiques à celles du repère sous-jacent</li>
<li>des axes gradués positionnés de l'autre coté de ceux du repère
sous-jacent.<br>
</li>
</ul>
<p>Faire ces opérations à la main n'est pas très compliqué non plus
:</p>
<pre style="font-family:Monospaced;font-style:normal;font-size:13.0;"><span style="color:rgb(174,92,176);text-decoration:underline;">clf</span> <span style="color:rgb(188,143,143);">reset</span>
<span style="color:rgb(174,92,176);text-decoration:underline;">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);">4</span><span style="color:rgb(74,85,219);">)</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(0,0,0);">ax</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(174,92,176);text-decoration:underline;">gca</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);">ax2</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(50,185,185);">newaxes</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);">ax2</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">axes_bounds</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</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);">axes_bounds</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">margins</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</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);">margins</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">filled</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);">off</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</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);">ax2</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">x_location</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);">top</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);">y_location</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);">right</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);">axes_visible</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);">"</span><span style="color:rgb(188,143,143);">on</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">on</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">on</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(174,92,176);text-decoration:underline;">plot</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.1</span> <span style="color:rgb(188,143,143);">0.9</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.1</span> <span style="color:rgb(188,143,143);">0.9</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">r</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(174,92,176);text-decoration:underline;">subplot</span><span style="color:rgb(74,85,219);">(</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(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(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(0,0,0);">ax</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(174,92,176);text-decoration:underline;">gca</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);">ax2</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(50,185,185);">newaxes</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);">ax2</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">axes_bounds</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</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);">axes_bounds</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">margins</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</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);">margins</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">filled</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);">off</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</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);">ax2</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">x_location</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);">top</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);">y_location</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);">right</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);">axes_visible</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);">"</span><span style="color:rgb(188,143,143);">on</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">on</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">on</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(174,92,176);text-decoration:underline;">plot</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.1</span> <span style="color:rgb(188,143,143);">0.9</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.1</span> <span style="color:rgb(188,143,143);">0.9</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">r</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)
<img src="cid:part1.39C01297.BC99D64F@free.fr" alt="" width="481" height="310">
</span></pre>
<pre style="font-family:Monospaced;font-style:normal;font-size:13.0;"><font color="#400040"><font size="+1">En implémentant subplot(i,j,k, "new"), le code équivalent serait simplifié en
</font></font>
<font color="#400040"><font size="+1"><span style="color:rgb(174,92,176);text-decoration:underline;">clf</span> <span style="color:rgb(188,143,143);">reset</span>
<span style="color:rgb(174,92,176);text-decoration:underline;">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);">4</span><span style="color:rgb(74,85,219);">)</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(174,92,176);text-decoration:underline;">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);">4</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">new</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(174,92,176);text-decoration:underline;">plot</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.1</span> <span style="color:rgb(188,143,143);">0.9</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.1</span> <span style="color:rgb(188,143,143);">0.9</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">r</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(174,92,176);text-decoration:underline;">subplot</span><span style="color:rgb(74,85,219);">(</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(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(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(174,92,176);text-decoration:underline;">subplot</span><span style="color:rgb(74,85,219);">(</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(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);">"</span><span style="color:rgb(188,143,143);">new</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(174,92,176);text-decoration:underline;">plot</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.1</span> <span style="color:rgb(188,143,143);">0.9</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.1</span> <span style="color:rgb(188,143,143);">0.9</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">r</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)
</span></font><font size="+1">Samuel</font><font size="+1"><span style="color:rgb(74,85,219);">
</span></font></font><span style="color:rgb(74,85,219);"></span></pre>
<span style="color:rgb(74,85,219);"><br>
</span>
</body>
</html>