Plot different colours - Scilab

Spyros Rokopanos picture Spyros Rokopanos · Dec 12, 2012 · Viewed 17.8k times · Source

Is it possible to have different colours in my plot in Scilab? I use the mtlb_hold to hold the graph and it works fine, but my problem is that then I have the same colours in my graph. In Matlab with the hold command, I have different colours. Is it possible to have different colours in Scilab too? Thank you in advance.

Answer

Spyros Rokopanos picture Spyros Rokopanos · Dec 13, 2012

Just found it. In the plot function, for example plot(), you can pass a second argument which specifies the color that will be used. For example, you can use use b for blue color, g for green, r for red and call plot() like this: plot(z,"r").