Theory:
As we know the sine function isy = \sin x
Where x is either in degree or in radian.A program in Scilab for y = \sin x
Decoding:
- In line no. 1, command clf(); is used to erase the previous plot in the graphic window.
- Line no. 2 is for the loop over x from x = 0 to x=2\pi with step size 0.01.
- Line no. 3 is for the sine function.
- Line no. 4 is to plot the sine function. Here, the command leg is used for the legend which will appear in the graphics window.
Output

How to modify the graph?
To modify the axis, go to “Edit” and then “Axes properties”. A new window will appear on your screen called “Graphic Editor”. Here you can edit axes as well as compound properties. You can shift x-axes from the bottom to the middle. You can also change the size of the fount of axes. In the Compound Properties, you can change the color of your graph. You can also change the lines from solid to dot or double dots etc.
The graph after the above-mentioned modification is shown below.
