[Scilab-users] xfpoly: would wish that the filling colour could be made transparent.

Antoine Monmayrant antoine.monmayrant at laas.fr
Sat Apr 10 08:10:03 CEST 2021


On 09/04/2021 23:55, Heinz Nabielek wrote:
> xfpoly does generally a good job for me, sometimes I would wish that 
> the filling colour could be made transparent.
This is a much needed improvement of the scilab graphical stack that 
currently does not provide any transparency.
I think this is not an easy improvement.
At the moment, my workaround is to plot everything I need, export as svg 
and than add the transparency I need in the svg using inkscape or 
directly editing the svg file with a text editor...
> Heinz
>
> PS 1: Is there a new version of the 2011 BetweenCurves around?
Er, no, it was just a dirty hack I needed for my own publications and I 
think 2011 is the most recent one.
I can try to see how to improve it if this can improve scilab...
>
> PS 2: Any suggestion to make my clumsy coding more elegent, is highly 
> welcome
>
> PS 2: BTW, since the recent lockdown, infection rates are coming down 
> in Austria.....
>
>
> A=[12.628     13.942     17.077     17.054     15.594     14.976     14.796     11.875     13.448     16.504     17.717     19.447     16.099     13.302     13.762     16.032     19.492     22.098     20.425     21.087     20.649     14.268     19.402     22.525     26.862     23.514     27.603     23.851     15.830     21.570     28.682     26.109     29.974     28.727     24.705     21.458     27.087     28.401     33.670     35.119     33.962     28.120     21.301     27.244     37.467     37.715     39.490     37.569     30.480     27.098     38.366     36.951     35.097     43.759     39.299]';
> d=(1:length(A))';
> up=10^(d/53);
> M=[ones(up)  up];
> aa=M\A;
> B=inv(M'*M);
> DD=(1:110)';
> U=10^(DD/53);
> MM=[ones(U)  U];
> yh  =  M*aa;      //Fitted values yh to approximate measured y's
> e=A-yh;      //Errors or residuals
> SSE=e'*e;      //Sum of squared errors
> ybar=mean(A);  R2=1-SSE/sum((A-ybar)^2);
> [m  n]=size(M);
> MSE  =  SSE/(m-n-1);      //Mean square error
> C=MSE*B   // covariance matrix
> sig=sqrt(MSE);
> seb=sqrt(diag(C));
> [aa  seb]
> [n  pp]=size(M);
> CONF=.95;  alpha=1-CONF;
> ta2  =  cdft('T',n-pp,1-alpha/2,alpha/2);      //t-value for alpha/2
> yhh=  MM*aa;
> p=sig*sqrt(diag(1+MM*B*MM'));
> N=[yhh+ta2*p   yhh-ta2*p];
> polyX  =  [DD;flipdim(DD,1)];
> polyY  =  [N(:,1);flipdim(N(:,2),1)];
> plot2d([0  80],[1  100],  style=0,logflag  =  "nl");
> xgrid;
> xfpoly(polyX,  polyY,6);
> plot(DD,MM*aa,'g.-');
> plot(d,A,'b.')  ;
> title('AUSTRIA daily infection rates per 100,000','fontsize',5);
> xlabel('days since 1 Feb 2021','fontsize',3);
> ylabel('number of infections per day per 100,000','fontsize',3);
> legend('data from Johns Hopkins GitHub','95% confidence range','model 
> prediction','AUSTRIA recorded',4);
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20210410/d5e66e18/attachment.htm>


More information about the users mailing list