Now, let's learn how to change the line's style.
The possible line's styles in Scilab are:
- Solid line (default);
- Dashed line;
- Dotted line;
- Dash-dotted line;
- No line.
Some examples:
-->x = 1:10;
-->y1 = x.^2 + 1;
-->plot(x, y1, "-");
-->y2 = x.^2 + 2;
-->plot(x + 10, y2, "--");
-->y3 = x.^2 + 3;
-->plot(x + 20, y3, ":");
-->y4 = x.^2 + 4;
-->plot(x + 30, y4, "-.");
The result:
You may use the line's styles with colors, for example:
--> plot(x, y, "r--");
No comments:
Post a Comment