<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<font face="Courier New">Philipp,<br>
<br>
No, I don't want to have the figure maximized always; rather, to
be able to toggle between normal size and maximized (when I need
to focus on small details such as the difference between
experimental and fitted graphs). That's actually why the current
behavior is bothersome, since once redrawn, there is practically
no difference between normal and maximized, so I cannot, for
instance, see at the same time two figures. I need then to resize
it manually. I shouldn't need to tweak the figure properties for
that...<br>
<br>
As to question 2, I refer to the normal location immediately after
rendering the figure. The botton of the figure is hidden by the
task bar so I find myself having to manually relocate each and all
figures I create just to see its complete content, and that
doesn't seem to be a normal or expected behavior.<br>
<br>
I don't know if that happens only to me or everyone is
experiencing this when the task bar is always visible.<br>
<br>
Regards,<br>
<br>
Federico Miyara<br>
<br>
<br>
</font><br>
<br>
<br>
<div class="moz-cite-prefix">On 03/09/2021 07:39, P M wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CACf7ODuBq46ws_dDhMGx5dfO6LCFe3eTyDxtOXgwruKnjDTSsA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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
</pre>
<pre style="font-family:Monospaced;font-style:normal">
<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"
moz-do-not-send="true">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>
<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" moz-do-not-send="true"><img
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif"
alt="" style="width: 46px; height: 29px;"
moz-do-not-send="true" 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"
moz-do-not-send="true">www.avast.com</a> </td>
</tr>
</tbody>
</table>
<a
href="#m_1245799826228827734_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"
width="1" height="1" moz-do-not-send="true"> </a></div>
</div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org" target="_blank"
moz-do-not-send="true">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>