![]() The arguments of the legend() function are string variables for each line plot, and a number which represents the position where the legend is going to be displayed on the graphic window. If we have multiple line plots on the same axes, we need to add also a legend, in order to distinguish between the lines. It has the same syntax as the labels, and displays the string argument as a centered text above the axes. The arguments are string variables representing the text to be displayed.įor the title of the plot we use the title() function. The axes labels are added with xlabel() and ylabel() functions. Each signal processing subject is illustrated by examples and gures which were demonstrated using Scilab. The default setting for the grid are: black color and dashed lines. The grid is displayed with the function xgrid(). For this we need to enter at the Scilab console the following instructions: If you don't remember exactly what a function name is, but you remember how it starts, you can use the tab-completion functionality in the Scilab console. You can use them in statements, like this command to find the sine of pi/2: -> sin(pi / 2) ans 1. ![]() To have a complete plot we need to add a grid, labels for both axes, a title and a legend. In the Scilab documentation pi is described as: pi returns the floating-point number nearest the value of. There also are built-in constants for numbers like e or pi. ![]() With every plot() function we add, new line plots are created on the same graphic window. Image: Multiple line plot on the same axes in Scilab
0 Comments
Leave a Reply. |