[Scilab-users] 22.5° ray separations in polarplot

P M p.muehlmann at gmail.com
Thu Mar 28 10:55:29 CET 2019


...well you always can kind of rebuild the polarplot.
See example below,
Best regard,
Philipp

clc;clear();x = (0:360)/180*%pi;y = 0.5*(1 + cos(x));z = 0.5 + 0.5*(1
+ cos(x));clfpolarplot([x' x'],[y' z'],[1 2])
a = gca();// clear old scale...first 24 entries we want to change//24
= 12x text + 12x lines// you need to check if this is true for the
actual polarplot you want to changefor(i=1:24)
    delete(a.children(1))end// play with data bounds to keep all
labels visible in the grapha.data_bounds = [-2,-2;2,2];// angle
spacing  = 22.5°alphaStep = 22.5 // [°]rL=1.6;  // Radius of labels
// rebuild the radial linesr = 1.5  // is the radius of the outer
circlecount = 0;for(i = 1:360/alphaStep)
    alpha = count * alphaStep;
    x = cosd(alpha) * r ;
    y = sind(alpha) * r ;
    xsegs([0 x],[0 y], 0);
    e = gce();
    e.line_style = 8;  // defines the linestyle
    count = count + 1;end
// rebuild the labelscount = 0;for(i = 1:360/alphaStep)
    alpha = count * alphaStep;
    // get the length of the actual label
    tmp=xstringl(0,0,string(alpha)+'°')  // or without the '°' sign
    w=tmp(3)
    h=tmp(4)
     xstring((rL+w/2)*cosd(alpha)-w/2, (rL+h/2)*sind(alpha)-h/2,
string(alpha)+'°')  // or without the '°' sign
    count = count + 1;end


Am Do., 28. März 2019 um 06:39 Uhr schrieb Samuel Gougeon <sgougeon at free.fr
>:

> Le 27/03/2019 à 21:37, Heinz Nabielek a écrit :
> > Friends and colleagues:
> >
> > Scilab polarplot does a great job displaying my 155,508 measured data
> pairs wind direction/ wind speed in a split second( while MS Excel is
> petrified) to make a great wind rose.
> >
> > One concern: I would like to change the default 30° ray separation into
> 22.5° separations to indicate N, NNE, NE, ENE, E .... directions.
> >
> > How can I do that?
>
> edit polarplot 246
> // on line 246, replace eA=30 with eA=22.5
> re-exec polarplot.sci, and then use it.
>
> This angular step could become an input option in a next version.
>
> Samuel
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20190328/0466a8d7/attachment.htm>


More information about the users mailing list