Plot with Color

Hello,

i wonder if the new Scilab Version 2024 has changed some commands

How can i plot with any simple color in Scilab?

What is the difference between plot2d and plot?

t = -%pi:%pi/20:2*%pi;
plot(t,sin,'ro')

at line 145 of function getLineSpec ( /home/smartie/Tools/scilab-2024.0.0/share/scilab/modules/graphics/macros/getLineSpec.sci line 156 )
at line 413 of function plot ( /home/smartie/Tools/scilab-2024.0.0/share/scilab/modules/graphics/macros/plot.sci line 426 )

Invalid index.

Thank you!

You’d better say

t = -%pi:%pi/20:2*%pi;
plot(t,sin(t),'ro')

S.

1 Like

Hello,

This is working on my Scilab 2024.0.0, this may come from a specific setup on the figure side ; did you made some modification on the Figure colors / marks ; do you load the figure from a saved file ?

--> t = -%pi:%pi/20:2*%pi;

--> plot(t,sin,'ro')

--> getversion()
 ans  =

  "scilab-2024.0.0"

Thank you both,
probably you are right.

This is what works for me:

plot(t,sin(t),'Color',[1 0 0])