Re: [Scilab-users] surf & isoview: bug or unexpected "feature"

2018-02-21 Thread Stéphane Mottelet

Great ! But in this case I would add also

isoview('off') missed switching .cube_scaling='on'

S.

Le 21/02/2018 à 13:37, Samuel Gougeon a écrit :

Hi Antoine and Stéphane,

Please look at https://codereview.scilab.org/#/c/18857/ and its header,
and try
--> uman isoview! @

Samuel

Le 21/02/2018 à 10:59, Antoine Monmayrant a écrit :

Hi all,


I am a bit surprised by the way isoview acts on a surf plot.
It seems to just scale the x,y,z axis so that the plot is inside an 
isometric 3D cube.
I was expecting an aspect ratio that depends on the Z matrix value 
and size or on the X,Y coordinate vectors and the Z matrix value.

Here is an example:

//without X,Y axis: expecting an aspect ratio in the (x,y) plan 
corresponding to the dimensions of the Z matrix

Z=rand(10,30);
h=scf();
surf(Z);
isoview("on");//we should see a 3/1 aspect ratio in the x/Y plane but 
we have square


//trying with X,Y coordinates: expecting an the plot to fit inside a 
"cube" with aspect ratios along the x,y & z directions

//that depends on max(X)-min(X), max(Y)-min(Y) & max(Z)-min(Z)
Z=rand(10,30);
X=1:size(Z,2);
Y=1:size(Z,1);
h=scf();
surf(X,Y,Z);
isoview("on");//we should see a 3/1 aspect ratio in the x/Y plane but 
we have square



Am I the only one to expect this behaviour?


Antoine





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] surf & isoview: bug or unexpected "feature"

2018-02-21 Thread Samuel Gougeon

Hi Antoine and Stéphane,

Please look at https://codereview.scilab.org/#/c/18857/ and its header,
and try
--> uman isoview! @

Samuel

Le 21/02/2018 à 10:59, Antoine Monmayrant a écrit :

Hi all,


I am a bit surprised by the way isoview acts on a surf plot.
It seems to just scale the x,y,z axis so that the plot is inside an 
isometric 3D cube.
I was expecting an aspect ratio that depends on the Z matrix value and 
size or on the X,Y coordinate vectors and the Z matrix value.

Here is an example:

//without X,Y axis: expecting an aspect ratio in the (x,y) plan 
corresponding to the dimensions of the Z matrix

Z=rand(10,30);
h=scf();
surf(Z);
isoview("on");//we should see a 3/1 aspect ratio in the x/Y plane but 
we have square


//trying with X,Y coordinates: expecting an the plot to fit inside a 
"cube" with aspect ratios along the x,y & z directions

//that depends on max(X)-min(X), max(Y)-min(Y) & max(Z)-min(Z)
Z=rand(10,30);
X=1:size(Z,2);
Y=1:size(Z,1);
h=scf();
surf(X,Y,Z);
isoview("on");//we should see a 3/1 aspect ratio in the x/Y plane but 
we have square



Am I the only one to expect this behaviour?


Antoine





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] surf & isoview: bug or unexpected "feature"

2018-02-21 Thread Stéphane Mottelet

Hello,

The cube_scaling appeared with version 5.2 or 5.3 (I don't remember) 
because the previous default behavior, which corresponds to


cube_scaling="off"

could produce surfaces which were very hard to visualize with default 
angles and hard to homogeneously "rotate" in the elevation angle, when 
the surface is very flat. See this example:


clf
[x,y]=meshgrid(-1:0.1:1,-2:0.1:2);
surf(x,y,x.*y*1e-5)
gca().cube_scaling="off";

The default combination cube_scaling="on" and isoview="off" corresponds 
to the default behavior in Matlab. Introducing the cube_scaling property 
and its default value helps "migrating users" as they obtain the same 
thing in both softwares.


Anyway, I don't think that the combination cube_scaling="off" and 
isoview="off" has still an interest as it can produce the annoying 
behavior of the above example. The default combination cube_scaling="on" 
and isoview="off" allows the 3D object to fill the whole 3D box whatever 
the proportions of the enclosing 2D canvas, which is the expected 
default behavior.


Antoine's remark points out that cube_scaling="on" and isoview="on" 
produces a plot whose proportions are completely wrong with respect of 
the value of isoview="on". Adding in the help page of 
"axes_properties/isoview " a sentence such as


If you want *real* isometric scales on all axes in 3D you have to set 
cube_scaling property to 'off'


is not admissible.Setting the value of cube_scaling  to the opposite of 
the isoview value when the latter is changed could be a solution. At 
least, when the high level isoview *command* is used.



S.

Le 21/02/2018 à 11:06, Antoine Monmayrant a écrit :

OK, answering my own question:

It seems that when calling surf(), the cube_scaling property of the 
current axis is set to "on", which results in the observed behaviour.
Manually resetting to its default value "off", gives me the expected 
behaviour.
Should I fill a bug about the absence of cube_scaling mention on the 
help pages of surf() and isoview() ?


Antoine

Le 21/02/2018 à 10:59, Antoine Monmayrant a écrit :

Hi all,


I am a bit surprised by the way isoview acts on a surf plot.
It seems to just scale the x,y,z axis so that the plot is inside an 
isometric 3D cube.
I was expecting an aspect ratio that depends on the Z matrix value 
and size or on the X,Y coordinate vectors and the Z matrix value.

Here is an example:

//without X,Y axis: expecting an aspect ratio in the (x,y) plan 
corresponding to the dimensions of the Z matrix

Z=rand(10,30);
h=scf();
surf(Z);
isoview("on");//we should see a 3/1 aspect ratio in the x/Y plane but 
we have square


//trying with X,Y coordinates: expecting an the plot to fit inside a 
"cube" with aspect ratios along the x,y & z directions

//that depends on max(X)-min(X), max(Y)-min(Y) & max(Z)-min(Z)
Z=rand(10,30);
X=1:size(Z,2);
Y=1:size(Z,1);
h=scf();
surf(X,Y,Z);
isoview("on");//we should see a 3/1 aspect ratio in the x/Y plane but 
we have square



Am I the only one to expect this behaviour?


Antoine







--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] compilation with OCaml 4.06

2018-02-21 Thread Clément David
Hello Florian,

The easier would be to depend on the external Num library for the 6.0.x family 
as far as this
library remains available; statically build against it is the way to go for 
OCaml code. Num might
also be packaged in your system, use ocamlfind to look for it.

Thanks,

--
Clément

Le mercredi 21 février 2018 à 08:41 +0100, Florian Blachère a écrit :
> Hello,
> 
> Scilab 6.0.0 and 6.0.1 (and the master branch) cannot be build using 
> OCaml 4.06 because this release remove the Num library 
> (https://ocaml.org/releases/4.06.html#Changes , 
> https://github.com/ocaml/ocaml/pull/1178), do you have any advice to 
> build Scilab with recent OCaml: integrate Num in Scilab, build Num 
> oustside of Scilab and link against it, ... ?
> 
> Thanks by advance,
> 
> Florian
> 
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] surf & isoview: bug or unexpected "feature"

2018-02-21 Thread Antoine Monmayrant

OK, answering my own question:

It seems that when calling surf(), the cube_scaling property of the 
current axis is set to "on", which results in the observed behaviour.
Manually resetting to its default value "off", gives me the expected 
behaviour.
Should I fill a bug about the absence of cube_scaling mention on the 
help pages of surf() and isoview() ?


Antoine

Le 21/02/2018 à 10:59, Antoine Monmayrant a écrit :

Hi all,


I am a bit surprised by the way isoview acts on a surf plot.
It seems to just scale the x,y,z axis so that the plot is inside an 
isometric 3D cube.
I was expecting an aspect ratio that depends on the Z matrix value and 
size or on the X,Y coordinate vectors and the Z matrix value.

Here is an example:

//without X,Y axis: expecting an aspect ratio in the (x,y) plan 
corresponding to the dimensions of the Z matrix

Z=rand(10,30);
h=scf();
surf(Z);
isoview("on");//we should see a 3/1 aspect ratio in the x/Y plane but 
we have square


//trying with X,Y coordinates: expecting an the plot to fit inside a 
"cube" with aspect ratios along the x,y & z directions

//that depends on max(X)-min(X), max(Y)-min(Y) & max(Z)-min(Z)
Z=rand(10,30);
X=1:size(Z,2);
Y=1:size(Z,1);
h=scf();
surf(X,Y,Z);
isoview("on");//we should see a 3/1 aspect ratio in the x/Y plane but 
we have square



Am I the only one to expect this behaviour?


Antoine





--
+++

 Antoine Monmayrant LAAS - CNRS
 7 avenue du Colonel Roche
 BP 54200
 31031 TOULOUSE Cedex 4
 FRANCE

 Tel:+33 5 61 33 64 59
 
 email : antoine.monmayr...@laas.fr

 permanent email : antoine.monmayr...@polytechnique.org

+++

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] surf & isoview: bug or unexpected "feature"

2018-02-21 Thread Antoine Monmayrant

Hi all,


I am a bit surprised by the way isoview acts on a surf plot.
It seems to just scale the x,y,z axis so that the plot is inside an 
isometric 3D cube.
I was expecting an aspect ratio that depends on the Z matrix value and 
size or on the X,Y coordinate vectors and the Z matrix value.

Here is an example:

//without X,Y axis: expecting an aspect ratio in the (x,y) plan 
corresponding to the dimensions of the Z matrix

Z=rand(10,30);
h=scf();
surf(Z);
isoview("on");//we should see a 3/1 aspect ratio in the x/Y plane but we 
have square


//trying with X,Y coordinates: expecting an the plot to fit inside a 
"cube" with aspect ratios along the x,y & z directions

//that depends on max(X)-min(X), max(Y)-min(Y) & max(Z)-min(Z)
Z=rand(10,30);
X=1:size(Z,2);
Y=1:size(Z,1);
h=scf();
surf(X,Y,Z);
isoview("on");//we should see a 3/1 aspect ratio in the x/Y plane but we 
have square



Am I the only one to expect this behaviour?


Antoine



--
+++

 Antoine Monmayrant LAAS - CNRS
 7 avenue du Colonel Roche
 BP 54200
 31031 TOULOUSE Cedex 4
 FRANCE

 Tel:+33 5 61 33 64 59
 
 email : antoine.monmayr...@laas.fr

 permanent email : antoine.monmayr...@polytechnique.org

+++

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users