do a plot
Initialisation
- At first a graphic figure should be prepared. It is possible to clear an existing figure or to generate a new one.
- Launch the following commands :
.
scf(num) // create figure with number num or set figure num to the current figure clf(num) // clear figure num xdel(num) // closes grafic windows num
All plotting action will be done in the currend figure. The variable num can be leaved out, to address the current figure (e.g. clf()).
example
scf(0); //create figure clf(0); //clear figure //definition of the x-axis and the y values x= [0: (%pi/20): 2*%pi]; y=sin(x); //plot the data plot2d(x,y); plot2d(x,2*y); // will be plotted in the same figure xdel(0); //close figure
Using plot2d()
Take a look at the scilab help.
Using gca()
Using gca is useful to change the setting of the figure.
