[Scilab-users] Spider Chart

Clément David clement.david at scilab-enterprises.com
Tue Aug 18 09:16:04 CEST 2015


Hello Pascal,

First thanks for sharing this piece of code, it seems great enough to
be integrated into Scilab.

If you want it to be integrated, do not hesitate to write a SEP [1]
and/or test-cases and post them to better understand the implementation
(and limitation of it).

[1]: http://wiki.scilab.org/How%20to%20introduce%20a%20new%20function%2
0in%20Scilab

Regards,

--
Clément 

Le mardi 11 août 2015 à 15:56 +0200, Pascal Buehler a écrit :
> Comming nearer, but i have problems to seperate the strings for each 
> angle. is there a goo algorithm or way to put each Test to each 
> webcorner? 
> 
> here is the code so far. 
> 
> //function Spider_Chart(Text,Value)
> 
> //make shure the Text and Value entrance are correct.
> Text=["fgdfgdf","dfsdf","fdf","dfsfd","dfggg","dfgfgg"]
> [a]=type(Text);
> if a~= 10 then disp("Error entry on Text");
> end;
> 
> Value=[10,20,40,30,5,15]
> [b]=type(Value);
> if b~= 1 then disp("Error entry on Value");
> end;
> 
> //the size of Text list and the maximum value defines the Web.
> c=size(Text);
> d=size (Value);
> 
> if c(2)~= d(2) then disp("Error entry");
> end;
> 
> e=c(2);
> f=[1:1:e,1];
> g=2*%pi/e*f;
> h=max(Value)*1.2;
> i=zeros(c(1),c(2)+1);
> j=h*sin(g);
> k=h*cos(g);
> 
> //Ticks
> l=[5:5:h]';
> m=[1:1:h]';
> if h>=10 then n=l*sin(g), o=l*cos(g);
>    else n=m*sin(g), o=m*cos(g);
> end;
> 
> //Text
> 
> //draw the basic Spider-Chart
> figure("figure_name",gettext("Spider 
> Chart"),"Position",[50,50,500,500],"BackgroundColor",[1.0,1.0,1.0]);
> title('$Spider\ Chart$','color','black','fontsize',5);
> 
> xsegs([i;j],[i;k]);
> p = gce(); p.segs_color=33; p.line_style=1;
> 
> xpoly(j,k)
> q = gce(); q.foreground=33; q.line_style=1;
> 
> xpoly(n',o')
> r = gce(); r.foreground=33; r.line_style=1;
> 
> xstring(j,k,Text(1:1:g),0)
> ????
> 
> //draw the input values Spider-Chart 
> 
> with best regards / mit freundlichen Grüssen / cordialement 
> 
> Pascal Bühler
> Qualität-Hardware / Prüfingenieur
> SAUTER HeadOffice
> Fr. Sauter AG
> Im Surinam 55, CH-4016 Basel
> Telefon +41 (0)61 695 5646
> Telefax +41 (0)61 695 5619
> http://www.sauter-controls.com
> 
> DISCLAIMER:
> This communication, and the information it contains is for the sole 
> use of
> the intended recipient. It is confidential, may be legally privileged 
> and
> protected by law. Unauthorized use, copying or disclosure of any part
> thereof may be unlawful. If you have received this communication in 
> error,
> please destroy all copies and kindly notify the sender.
> 
> Before printing out this e-mail or its attachments, please consider 
> whether 
> it is really necessary to do so.
> Using less paper helps the environment.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



More information about the users mailing list