[Scilab-users] How to define the Y Range of plot

10 messages
Open this post in threaded view
|

[Scilab-users] How to define the Y Range of plot

 Hello, I would like to define the Y Range of plot. Could you tell me the Scilibe code to realize this. If I use the plot command, Y range is automatically set by Scilab. I would like to set the Y range, e.g. min -10 to Max 20. Thanks for your advise -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

Re: How to define the Y Range of plot

 Hello, --> help data_bounds Regards Stefan On 2020-08-08 10:56, Fukashiimo wrote: > Hello, > > I would like to define the Y Range of plot. Could you tell me the Scilibe > code to realize this. > If I use the plot command, Y range is automatically set by Scilab. > I would like to set the Y range, e.g. min -10 to Max 20. > > Thanks for your advise > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html> _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users> _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

Re: How to define the Y Range of plot

 Hello, Mr. Stefan, Thanks. Could you please tell me how to se it? I tried the following code. My intention is to define X: from -0.5 to +0,5 and Y from -2 to +2. However, plot command didn't work as I expected. Any idea? cafix.data_bounds = [-0.5,-2;0.5,2]; cafix.tight_limits="on"; cafix.auto_scale="off"; set(gca(),"data_bounds", cafix.data_bounds);   Thanks -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

Re: How to define the Y Range of plot

 Sorry for a wrong letter in my previous mail! Hello Fukashiimo, 1. get the handle of your axes: --> cafix = gca(); 2. set the properties: --> cafix.tight_limits="on"; --> cafix.auto_scale="off"; --> cafix.data_bounds = [-0.5,-2;0.5,2]; Regards Stefan On 2020-08-08 12:15, Fukashiimo wrote: > Hello, Mr. Stefan, > > Thanks. Could you please tell me how to se it? > I tried the following code. My intention is to define X: from -0.5 to +0,5 > and Y from -2 to +2. > However, plot command didn't work as I expected. Any idea? > > cafix.data_bounds = [-0.5,-2;0.5,2]; > cafix.tight_limits="on"; > cafix.auto_scale="off"; > set(gca(),"data_bounds", cafix.data_bounds); > > > Thanks > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html> _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users> _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

Re: How to define the Y Range of plot

 Hello, Mr. Stefan, Thanks. Should we put following codes before each plot command? cafix = gca(); cafix.tight_limits="on"; cafix.auto_scale="off"; cafix.data_bounds = [-0.5,-2;0.5,2]; -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

Re: How to define the Y Range of plot

 Hello, not before but after! Stefan On 2020-08-08 15:03, Fukashiimo wrote: > Hello, Mr. Stefan, > > Thanks. > > Should we put following codes before each plot command? > > cafix = gca(); > cafix.tight_limits="on"; > cafix.auto_scale="off"; > cafix.data_bounds = [-0.5,-2;0.5,2]; > > > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html> _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users> _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

Re: How to define the Y Range of plot

 That is if you want to change the data_ bounds each time (for very different data). I thought that was what you wanted. Otherwise you could use it only once after the first plot, or even before if you have no other figure open. (thanks Samuel!) On 2020-08-08 15:08, Stefan Du Rietz wrote: > Hello, not before but after! > > Stefan > > > On 2020-08-08 15:03, Fukashiimo wrote: >> Hello, Mr. Stefan, >> >> Thanks. >> >> Should we put following codes before each plot command? >> >> cafix = gca(); >> cafix.tight_limits="on"; >> cafix.auto_scale="off"; >> cafix.data_bounds = [-0.5,-2;0.5,2]; >> >> >> >> >> >> -- >> Sent from: >> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html  >> >> _______________________________________________ >> users mailing list >> [hidden email] >> http://lists.scilab.org/mailman/listinfo/users>> > _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

Re: How to define the Y Range of plot

 In reply to this post by Stefan Du Rietz Hello, Mr. Stefan, Thanks. plot (X,Y); cafix = gca(); cafix.tight_limits="on"; cafix.auto_scale="off"; cafix.data_bounds = [-0.5,-2;0.5,2]; set(gca(),"data_bounds", cafix.data_bounds); -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users