[Scilab-users] Fill plot line properties into a list

Samuel Gougeon sgougeon at free.fr
Sun Jun 3 11:26:06 CEST 2018


Le 02/06/2018 à 22:31, Jens Simon Strom a écrit :
> Hello Scilab intimates,
>
> The lines
>
> Cspec=list('Color','r','thickness',5);
> plot(1:5,Cspec(:))
>
> are functional, but the lines
>
> Cspec=list('line_mode','off','mark_mode','on','mark_style',1,'mark_foreground',5,'mark_size',5); 
>
> plot([1:5],Cspec(:))
>
> are not. What has to be changed?
>
> I would like to use  line specifying lists as function input arguments.

Presently, plot() accepts only "plot-like" properties names and values.
I agree that this is an issue, due to some wishes to make Scilab just a 
shadow of another language.

plot-like equivalences exist for some properties, but not for all, and 
some features are not documented.
The following code works and does what you aim to do:

Cspec = 
list('linestyle','none','marker','+','markforeground','r','marksize',5);
plot([1:5],Cspec(:))

Regards
Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180603/22b63de7/attachment.htm>


More information about the users mailing list