<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 25/02/2019 à 20:37, P M a écrit :<br>
    </div>
    <blockquote
cite="mid:CACf7ODtydc2iRL=CnzEJq26rVOFmKUPYc5Hd9NBD50jW+hMEwA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">
                <div>
                  <div>no...I'm not (yet) prime minister :-))<br>
                    <br>
                  </div>
                  What do I mean? Please, check this small example:<br>
                </div>
                <br>
                <pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(50,185,185)">clear</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)">clc</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(50,185,185)">xdel</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)">x</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(174,92,176);text-decoration:underline">linspace</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)">10</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">y</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(0,0,0)">x</span> <span style="color:rgb(92,92,92)">.*</span> <span style="color:rgb(0,0,0)">x</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">f1</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(50,185,185)">figure</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)">f1</span><span style="color:rgb(92,92,92)">.</span><span style="color:rgb(170,170,170)">background</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(188,143,143)">8</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(174,92,176);text-decoration:underline">title</span> <span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">'</span><span style="color:rgb(188,143,143)">my title</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)">position</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)">10</span> <span style="color:rgb(188,143,143)">100</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(174,92,176);text-decoration:underline">subplot</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">221</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</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(0,0,0)">x</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,0)">y</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">a1</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)">a1</span><span style="color:rgb(92,92,92)">.</span><span style="color:rgb(170,170,170)">data_bounds</span> <span style="color:rgb(92,92,92)">=</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)">0</span><span style="color:rgb(0,0,0)">;</span><span style="color:rgb(188,143,143)">10</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(188,143,143)">100</span><span style="color:rgb(74,85,219)">]</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">a1</span><span style="color:rgb(92,92,92)">.</span><span style="color:rgb(170,170,170)">tight_limits</span> <span style="color:rgb(92,92,92)">=</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(0,0,0)">,</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(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(0,0,0)">;

so far so good.
</span></pre>
                <pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)">change to</span><span style="color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">: </span>    <span style="color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">a1</span><span style="color:rgb(92,92,92)">.</span><span style="color:rgb(170,170,170)">data_bounds</span> <span style="color:rgb(92,92,92)">=</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)">0</span><span style="color:rgb(0,0,0)">;</span><span style="color:rgb(188,143,143)">10</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(188,143,143)">200</span><span style="color:rgb(74,85,219)">]</span><span style="color:rgb(0,0,0)">;</span></span></span></pre>
                <pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">You see that the title position changes.

</span></span></pre>
                <pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)">I need to play with a1.data_bounds.
</span></pre>
                <pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)">This is because my diagram representes data from a file and each file content may change the Y-axis...so I can not have a fixed value for a1.data_bound.

</span></pre>
                <pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)">I probably could figure out how to set the Y-position of the title with respect to max(y).
</span></pre>
                <pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)">I just thought it is quite nice, if the position of the title would be depending on just the figure size and not on the axis scale.
</span></pre>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Thanks for the context. It often helps.<br>
    Here is a suggestion:<span style="color:rgb(74,85,219);"><br>
    </span>
    <pre style="font-family:Monospaced;font-style:normal;font-size:12.0;"><span style="color:rgb(174,92,176);text-decoration:underline;">clf</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);">2</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">ax1</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);">x</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(174,92,176);text-decoration:underline;">linspace</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(92,92,92);">-</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);">7</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">100</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</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(0,0,0);">x</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(50,185,185);">sin</span><span style="color:rgb(74,85,219);">)</span>

<span style="color:rgb(0,0,0);">axt</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(0,0,0);">axt</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">axes_bounds</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">ax1</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(174,92,176);text-decoration:underline;">plotframe</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(188,143,143);">0</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(50,185,185);">set</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">axt</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">box</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(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(74,85,219);">[</span><span style="color:rgb(188,143,143);">0</span> <span style="color:rgb(188,143,143);">0</span> <span style="color:rgb(188,143,143);">0</span> <span style="color:rgb(188,143,143);">0</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);">axes_visible</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(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(174,92,176);text-decoration:underline;">title</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">My title in normalized coodinates</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);">position</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);">0.2</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);">fontsize</span><span style="color:rgb(188,143,143);">"</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(174,92,176);text-decoration:underline;">sca</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">ax1</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span></pre>
    <br>
    Here, it's possible to control the normalization reference. This
    example uses<br>
    the entry area as the reference area. So it can be a subarea, not
    the whole figure.<br>
    But you can set it to the whole figure (or uicontrol frame) if you
    think it more handy.<br>
    <br>
    HTH<br>
    Samuel<br>
    <br>
  </body>
</html>