<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix"><font color="#993399">Hi Claus,<br>
</font><br>
Le 05/03/2016 09:39, Claus Futtrup a écrit :<br>
</div>
<blockquote cite="mid:56DA9B44.7060509@gmail.com" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hi there<br>
<br>
Thank you Samuel, it was very helpful. I have a few follow-up
questions<br>
<br>
I do a double-log plot.<br>
<span style="color:rgb(0,0,0);"><br>
a</span><span style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">log_flags</span> <span
style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(188,143,143);">"</span><span
style="color:rgb(188,143,143);">lln</span><span
style="color:rgb(188,143,143);">"</span><span
style="color:rgb(0,0,0);">;</span> <span
style="color:rgb(100,174,100);font-style:italic;">//
double-log plot</span><br>
<span style="color:rgb(0,0,0);">a</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">auto_scale</span> <span
style="color:rgb(92,92,92);">=</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><br>
<br>
When I plot the polygons, then I use data_bounds now, but on the
y-axis, the axis goes a bit further_<br>
<span style="color:rgb(0,0,0);"><br>
ymin</span> <span style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(0,0,0);">a</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">data_bounds</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">3</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(0,0,0);">;</span><br>
<span style="color:rgb(0,0,0);">ymax</span> <span
style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(0,0,0);">a</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">data_bounds</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">4</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;">// if ymax =
20.1 ... then plot goes to 30 !</span><br>
<span style="color:rgb(50,185,185);">xfpolys</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(74,85,219);">[</span><span
style="color:rgb(0,0,0);">f</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(0,0,0);">im1</span><span
style="color:rgb(74,85,219);">)</span> <span
style="color:rgb(0,0,0);">f</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(0,0,0);">im2</span><span
style="color:rgb(74,85,219);">)</span> <span
style="color:rgb(0,0,0);">f</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(0,0,0);">im2</span><span
style="color:rgb(74,85,219);">)</span> <span
style="color:rgb(0,0,0);">f</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(0,0,0);">im1</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(74,85,219);">(</span><span
style="color:rgb(0,0,0);">ie1</span><span
style="color:rgb(74,85,219);">)</span> <span
style="color:rgb(0,0,0);">f</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(0,0,0);">ie2</span><span
style="color:rgb(74,85,219);">)</span> <span
style="color:rgb(0,0,0);">f</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(0,0,0);">ie2</span><span
style="color:rgb(74,85,219);">)</span> <span
style="color:rgb(0,0,0);">f</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(0,0,0);">ie1</span><span
style="color:rgb(74,85,219);">)</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(255,170,0);">..</span><br>
<span style="color:rgb(74,85,219);">[</span><span
style="color:rgb(0,0,0);">ymin</span> <span
style="color:rgb(0,0,0);">ymin</span> <span
style="color:rgb(0,0,0);">ymax</span> <span
style="color:rgb(0,0,0);">ymax</span><span
style="color:rgb(0,0,0);">;</span> <span
style="color:rgb(0,0,0);">ymin</span> <span
style="color:rgb(0,0,0);">ymin</span> <span
style="color:rgb(0,0,0);">ymax</span> <span
style="color:rgb(0,0,0);">ymax</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(255,170,0);"></span><span
style="color:rgb(74,85,219);">[</span><span
style="color:rgb(50,185,185);">color</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">"</span><span
style="color:rgb(188,143,143);">bisque</span><span
style="color:rgb(188,143,143);">"</span><span
style="color:rgb(74,85,219);">)</span> <span
style="color:rgb(50,185,185);">color</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">"</span><span
style="color:rgb(188,143,143);">scilabpink</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(74,85,219);">)</span><span
style="color:rgb(0,0,0);">;</span><br>
<br>
Is there a way to determine what is the upper limit for the
y-axis? ... a.axes_bounds doesn't seem to be helpful in any way
(or am I looking in the wrong place?).<br>
</div>
</blockquote>
<font color="#009900">.<br>
<font color="#993399">.data_bounds are reliable only if
gca().tight_limits="on". Otherwise, AFAIK, there is presently no
way to get the true bounds of the displayed axes. This has been
reported.<br>
</font></font><br>
<blockquote cite="mid:56DA9B44.7060509@gmail.com" type="cite">
<div class="moz-cite-prefix"> <span style="color:rgb(0,0,0);"><br>
a</span><span style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">grid_position</span> <span
style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(188,143,143);">"</span><span
style="color:rgb(188,143,143);">foreground</span><span
style="color:rgb(188,143,143);">"</span><span
style="color:rgb(0,0,0);">;</span> <span
style="color:rgb(100,174,100);font-style:italic;">// put grid
in the foreground - in front of the polygons</span><br>
<span style="color:rgb(0,0,0);">a</span> <span
style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(0,0,0);">a</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(188,143,143);">1</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">children</span><span
style="color:rgb(0,0,0);">;</span> <span
style="color:rgb(100,174,100);font-style:italic;">// what does
this do?</span><br>
<br>
As the comment says - what does children(1).children do?<br>
</div>
</blockquote>
.<br>
<font color="#993399"><font color="#993399">It is a vector of
handles. </font>It points to the set of background rectangles
generated with xfpolys(). It makes "lighter" forthcoming
operations on the rectangles.<br>
</font>
<blockquote cite="mid:56DA9B44.7060509@gmail.com" type="cite">
<div class="moz-cite-prefix"><font color="#993399"> </font><span
style="color:rgb(0,0,0);"><br>
a</span><span style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">line_mode</span><span
style="color:rgb(92,92,92);">=</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(100,174,100);font-style:italic;">// don</span><span
style="color:rgb(100,174,100);font-style:italic;">'</span><span
style="color:rgb(100,174,100);font-style:italic;">t </span><span
style="color:rgb(100,174,100);font-style:italic;">'</span><span
style="color:rgb(100,174,100);font-style:italic;">box</span><span
style="color:rgb(100,174,100);font-style:italic;">/frame'</span><span
style="color:rgb(100,174,100);font-style:italic;"> the
polygons (background squares)</span><br>
<span style="color:rgb(0,0,0);">a</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">data</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(255,170,0);">:</span><span
style="color:rgb(0,0,0);">,</span><span
style="color:rgb(188,143,143);">3</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(92,92,92);">=</span><span
style="color:rgb(92,92,92);">-</span><span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(0,0,0);">;</span> <span
style="color:rgb(100,174,100);font-style:italic;">// data(:,1)
= xaxis data, data(:,2) = yaxis data</span><br>
<span style="color:rgb(0,0,0);">a</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">2</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(92,92,92);">.</span><span
style="color:rgb(170,170,170);">data</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(255,170,0);">:</span><span
style="color:rgb(0,0,0);">,</span><span
style="color:rgb(188,143,143);">3</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(92,92,92);">=</span><span
style="color:rgb(92,92,92);">-</span><span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(0,0,0);">;</span> <span
style="color:rgb(100,174,100);font-style:italic;">// data(:,3)
= ???</span><br>
<br>
We set data(:,3) = -1 ... I can see the content in ,2 and ,1 ...
but what's in the third column? </div>
</blockquote>
Z. It is not assigned by default when the axes is in 2D .view.
Nevertheless, Z can be set to manage overlays.<br>
This is possible with polylines, but not with the rect graphical
type (as plotted with fxrects()).<br>
<br>
<blockquote cite="mid:56DA9B44.7060509@gmail.com" type="cite">
<div class="moz-cite-prefix">and why do we set it = -1 ?? ... I
see a(1) = first polygon (a 'box' in our case) and that a(2) =
second polygon-box. So is the third column = z-axis data? ...
Why do we need to make sure z-axis data are negative = -1 ??<br>
</div>
</blockquote>
<font color="#993399">.<br>
Change the value, and you will see why. No worry, it won't explode
:) I tried 0, but when it is on the foreground, the grid looks to
be set between 0 and -1. You can play with .grid_position and the
Z value (i did it), you will see. The Z of the grid can't be tuned
accurately. They can have only 2 predefined positions. It is not
very efficient. A .grid_z attribute would have been better (and
clearer) than .grid_position. It could come just by mimicking
some other softwares. This is too often the very ambition of
Scilab : just mimicking others.<br>
<br>
Since Scilab does not managed transparency (alpha channel), there
will be a problem if you draw crossed rectangles. The common part
will have the color of the highest-z rectangle.<br>
It was formerly possible to tuned the rendering mode -- setting
the new pixel color according to the current color of the pixel --
but <br>
1) it applied to the whole figure : </font><font color="#993399"><a class="moz-txt-link-freetext" href="https://help.scilab.org/docs/5.5.2/en_US/pixel_drawing_mode.html">https://help.scilab.org/docs/5.5.2/en_US/pixel_drawing_mode.html</a><br>
</font><font color="#993399">2) it is out-of-work since Scilab >
5.3.3 : <a class="moz-txt-link-freetext" href="http://bugzilla.scilab.org/12017">http://bugzilla.scilab.org/12017</a><br>
<br>
Here is what was possible with 2 octogons filled with bisque and
powderblue predefined colors, <br>
and the regression brought by Scilab 5.4.0, still unfixed.<br>
<img alt="" src="cid:part1.08010507.03030305@free.fr"
height="361" width="439"><img alt=""
src="cid:part2.05090008.08070708@free.fr" height="336"
width="379"><br>
<br>
Samuel<br>
<br>
</font><br>
</body>
</html>