<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 26/11/2016 18:06, Antoine Monmayrant
      a écrit :<br>
    </div>
    <blockquote cite="mid:2023-5839c100-2f-482ada00@133882949"
      type="cite">
      <pre wrap="">Le Samedi, Novembre 26, 2016 17:09 CET, Samuel Gougeon <a class="moz-txt-link-rfc2396E" href="mailto:sgougeon@free.fr"><sgougeon@free.fr></a> a écrit: 
 
</pre>
      <blockquote type="cite">
        <pre wrap="">Le 26/11/2016 16:14, Samuel Gougeon a écrit :
</pre>
        <blockquote type="cite">
          <pre wrap="">Le 26/11/2016 08:52, Antoine Monmayrant a écrit :
.../...
</pre>
          <blockquote type="cite">
            <pre wrap="">Two issues:

1) the help pages are missing description of most of the parameters,

</pre>
          </blockquote>
          <pre wrap="">Parameters description is not missing. It is just written for 
developers that are not users ;):
Format and datatype of the parameter, that's all. No need to know what 
it represents. Any such need?
I am jocking, but by the way most of pages are written in this way. 
Most of pages need a full overhaul by advanced users.
As a contributor, you are welcome, most likely because you know how 
much time you loose because of a poor documentation, vs how much time 
you would save + using a good doc - contributing to write it.

</pre>
          <blockquote type="cite">
            <pre wrap="">2) the two functions are apparently not using the same definition of frect:
</pre>
            <blockquote type="cite">
              <pre wrap="">
    plot2d();
    [wrect,frect,logflag,arect] = xgetech():
    xsetech(wrect, frect)// does not work for the scale part, ie frect
       at line    65 of function xsetech ( /pathtoscilab/share/scilab/modules/graphics/macros/xsetech.sci line 79 )
       Error : Min and Max values for one axis do not verify Min <= Max.
    xsetech(wrect, [frect(1),frect(3),frect(2),frect(4)]) // works fine, scale un changed
</pre>
            </blockquote>
            <pre wrap="">
</pre>
          </blockquote>
          <pre wrap="">I don't see that, for instance using the examples. Could you please 
provide a clear example setting parameters with xsetech() and reading 
them back from xgetech(), that would not match? Thanks!
</pre>
        </blockquote>
        <pre wrap="">

Arg, ok, sorry for misreading your example.

help xgetech() tells: |
"The rectangle [xmin, ymin, xmax, ymax] given by frect.."
while it actually returns [xmin xmax ymin ymax] that matches 
gca().data_bounds

help xsetech tells: "frect = [xmin, ymin, xmax, ymax]"
and that's the way it works.

The bug was introduced in xgetech() in 2012 when xgetech() became a 
macro instead of formerly a builtin function.
This shows that
|

  * |xgetech() is very few used. Otherwise, the bug would have been
    spotted before.|
</pre>
      </blockquote>
      <pre wrap="">
OK, so there's a bug. Should I open a bug report or not? I don't know how it is supposed to interact with your SEP.
I suppose I should open a bug report and point to your SEP or something like that?

</pre>
      <blockquote type="cite">
        <pre wrap="">  * |frect from the old xgetech() did not match gca().data_bounds. This
    was cryptic.|
  * |xsetech() does not accept gca().data_bounds as frect, but a puzzled
    version of it. It is a cryptic usage.|

|So, here is a *Scilab Enhancement Proposal (SEP)*:
|

  * |xgetech:|
      o |fix the code of xgetech.sci in order to match the old xgetech()
        version|
      o |set xgetech as obsolete, but keep its code (for back-compatibility)
        |
      o |undocument it|
  * xsetech:
      o extend subplot() to replace xsetech().
        Additional subplot() syntaxes to be designed. The new input
        formats should be the ones of the unpuzzled gca(). attributes
      o undocument xsetech() to make it a private internal function.

What do you think about that?
</pre>
      </blockquote>
      <pre wrap="">
Not sure I understood everything here.
I agree that a user can survive for some time without xsetech/xgetech.
I used scilab daily since 2.6 (was it in 2001 or something like that?) and I just discovered it now.
I agree that the naming is terrible!
However, I kind of dislike (read I really hate) subplot.
The defaults are just not doing the job for most of my plotting needs and I always end up piling up lines of  codes to tweak each axis created by subplot.
I like the way you can set things like size, position and margins ahead of time with xsetech.
With your proposal, we lose this possibility, right?</pre>
    </blockquote>
    .<br>
    The purpose is to merge xsetech() features in subplot(), not to
    cancel them.<br>
    <blockquote cite="mid:2023-5839c100-2f-482ada00@133882949"
      type="cite">
      <pre wrap="">
...
Wait a bit, I re-read your SEP: you propose to add optional arguments to subplot in order to set margins and so on with subplot?</pre>
    </blockquote>
    .<br>
    More than optional arguments, i propose to add new syntaxes. The
    purpose of subplot() and xsetech() is the same.<br>
    The subplot() short description presently tells: <br>
    <b>subplot - divide a graphics window into a matrix of sub-windows</b><br>
    <br>
    But this is not what subplot() actually does, but rather<br>
    <b><br>
      subplot - sets a new axes as a cell of a virtual grid sharing the
      current window</b><br>
    <br>
    <blockquote cite="mid:2023-5839c100-2f-482ada00@133882949"
      type="cite">
      <pre wrap="">
If it's the case, I'm with you on this one.
Still, how should we proceed?
Should I fill a bug report on xsetech/xgetech incompatibilities and then you comment with your SEP?</pre>
    </blockquote>
    <br>
    If a report is just about the bug, IMO its processing will lead to
    the SEP discussion.<br>
    For my part, i wouldn't work fixing or improving anything that looks
    useless <br>
    or badly designed to me, as xsetech() and xgetech() do.<br>
    We may post a report about xsetech() and xgetech() together to
    propose and discuss<br>
    the SEP in the report's thread.<br>
    <br>
    Samuel<br>
    <br>
  </body>
</html>