<div dir="ltr"><div>Hi Federico,</div><div><br></div><div>Assuming that you ALWAYS want to have the figure at max screen size:<br></div><div><br></div><div>Question 1:<br></div><div><br></div><div>You can work with the screen width/height values to maximize the figure.</div><div><br></div><div>To get the screen values you can use:  <br></div><div>- screenWidth =  getsystemmetrics('SM_CXSCREEN')</div><div>- screenHeight = getsystemmetrics('SM_CYSCREEN') <br></div><div><br></div><div>Your figureHeight may be some pixels less than the sceen Height, so that the taskbar won't be covered.<br></div><div><br></div><div>With these values you can set the figure size using the figure properties.<br></div><div><br></div><div>Question 2:</div><div>Maximising a figure at my PC results in a full screen figure, with the taskbar at the screen bottom beeing visible.

</div><div><br></div><div>Having the correct figure size (see Question 1), you can set the figure position by:</div><div>gcf().figure_position = .....</div><div><br></div><div><br></div><div><br></div><div>Other approach:</div><div><br></div><div>Instead of clearing the complete figure, you maybe only need to clear the graph (entitiy).</div><div>If you have multiple graphs in one figure, the approach is similar, but you need to pick the correct entity.<br></div><div><br></div><div>Assumption:  Only one graph within a single figure.<br></div><div><pre style="font-family:Monospaced;font-style:normal"><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)">100</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)">y</span> <span style="color:rgb(92,92,92)">=</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)">x</span><span style="color:rgb(74,85,219)">)</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(50,185,185)">figure</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">101</span><span style="color:rgb(74,85,219)">)</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(170,170,170)">background</span> <span style="color:rgb(92,92,92)">=</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(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)"><span style="color:rgb(0,0,0)">a</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)">e</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(174,92,176);text-decoration:underline">gce</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)">p</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(0,0,0)">e</span><span style="color:rgb(92,92,92)">.</span><span style="color:rgb(170,170,170)">children</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></pre><pre style="font-family:Monospaced;font-style:normal">--> Now maximize the figure manually or have it already a max screen size<br></pre><pre style="font-family:Monospaced;font-style:normal"><br><span style="color:rgb(0,0,0)">p</span><span style="color:rgb(92,92,92)">.</span><span style="color:rgb(170,170,170)">data</span> <span style="color:rgb(92,92,92)">=</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(100,174,100);font-style:italic">  // clearing the data of the graph ... same as a.children.children.data = []</span>
<span style="color:rgb(0,0,0)">y</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(50,185,185)">cos</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">x</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">// simulating  new data </span>
<span style="color:rgb(0,0,0)">p</span><span style="color:rgb(92,92,92)">.</span><span style="color:rgb(170,170,170)">data</span> <span style="color:rgb(92,92,92)">=</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(92,92,92)">'</span><span style="color:rgb(0,0,0)">;</span>       <span style="color:rgb(100,174,100);font-style:italic">// replotting the graph with new data</span><span style="color:rgb(0,0,0)"></span></pre></div><div><br></div><div>Note:  The approach does not change the axis min/max values....so you maybe need to tweak these parameters, depending on your data.<br></div><div><br></div><div><br></div><div>Good luck,</div><div>Philipp<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Do., 2. Sept. 2021 um 02:24 Uhr schrieb Federico Miyara <<a href="mailto:fmiyara@fceia.unr.edu.ar">fmiyara@fceia.unr.edu.ar</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">
    <br>
    <font face="Courier New">Dear All,<br>
      <br>
      I've noticed that when clearing the contents of a maximized figure
      using clf() and redrawing</font><font face="Courier New"> the
      figure</font><font face="Courier New"> from scratch,</font><font face="Courier New"> the maximized status</font><font face="Courier
      New"> changes status to normal with a size slightly larger than
      the available height of the screen. When maximizing it, it really
      shrinks to the available screen space. For instance<br>
      <br>
      figure(101);<br>
      scf(101);<br>
      clf(101);<br>
      gcf().background = -2;<br>
      plot(x, y)<br>
      <br>
      (I use this structure when I have several figures and need to
      refresh one of them). <br>
      <br>
      The presence of the first instruction is necessary for this to
      happen. The original (default) size is not recovered unless the
      figure is completely cleared.<br>
      <br>
      The second problem is that upon creation, any figure is located
      flush with the bottom of the screen, even if I have enabled that
      the task bar is always visible. This causes the bottom of the
      figure to be hidden behind the task bar. To make it vissible I
      need to manually move the figure upwards.<br>
      <br>
      The expected behavior would be that the window were completely
      visible from the beginning.<br>
      <br>
      I'm on Windows 7.<br>
      <br>
      Regards, <br>
      <br>
      Federico Miyara<br>
      <br>
      <br>
    </font><font face="Courier New"></font>
  <div id="gmail-m_1245799826228827734DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid rgb(211,212,222)">
        <tbody><tr>
      <td style="width:55px;padding-top:18px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" style="width: 46px; height: 29px;" width="46" height="29"></a></td>
                <td style="width:470px;padding-top:17px;color:rgb(65,66,78);font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Libre de virus. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" style="color:rgb(68,83,234)" target="_blank">www.avast.com</a>              </td>
        </tr>
</tbody></table>
<a href="#m_1245799826228827734_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></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>