<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)">;<br><br>so far so good.<br></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.<br><br></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.<br></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.<br><br></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).<br></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.<br><br></span></pre><pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)">Cheers, Philipp<br></span></pre><pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)"><br></span><span style="color:rgb(0,0,0)"><span style="color:rgb(0,0,0)"></span></span></pre><pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)"><br></span></pre><br><br><br><br><div><br></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Mo., 25. Feb. 2019 um 17:26 Uhr schrieb Samuel Gougeon <<a href="mailto:sgougeon@free.fr">sgougeon@free.fr</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <div class="gmail-m_7752607849999849277moz-cite-prefix">Hello P M <br>
      (Prime Minister ?)<br>
      <br>
      Le 25/02/2019 à 17:10, P M a écrit :<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div dir="ltr">
          <div>
            <div>
              <div>
                <div>
                  <div>Dear all,<br>
                    <br>
                  </div>
                  I am building a figure with 4 subplots.<br>
                  <br>
                </div>
                Now since I want to have a title in the figure I can use
                several options to set a title on the figure.<br>
                <br>
              </div>
              Currently I use <br>
              <br>
            </div>
            <div>subplot(221);<br>
            </div>
            plot(...)<br>
          </div>
          a1 = gca();<br>
        </div>
        <div>a1.title.Text = "my title";<br>
          <br>
        </div>
        <div dir="ltr">
          <pre style="font-family:Monospaced;font-style:normal"><font size="2"><span style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(0,0,0)">However so far I understand, the title position is somehow bound to the axis settings.</span></span></font><span style="color:rgb(0,0,0)"><font size="2"><span style="font-family:arial narrow,sans-serif"><span style="font-family:arial,helvetica,sans-serif">
such as: if   xmin xMax yMin yMax are changing the position of the title also changes</span>.</span></font>
</span></pre>
          <pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(74,85,219)"></span></pre>
          Now: I need to have the title position independend of the axis
          settings.<br>
        </div>
      </div>
    </blockquote>
    <br>
    What do you mean? The position of the title can be explicitly set
    with<br>
    <tt><br>
      title("My title", "position",[xtitle, ytitle])</tt><br>
    <br>
    where the coordinates [xtitle, ytitle] are given in data scale.<br>
    <br>
    Using this,  <tt>a1.title.auto_position</tt> is turned <tt>"off"</tt>,
    and the position that you set should remain independent of any
    changes of data bounds.<br>
    Isn't it the case?<br>
    <br>
    HTH<br>
    Samuel<br>
    <br>
  </div>

_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br>
</blockquote></div>