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

2021-04-12 Thread Antoine Monmayrant


On 10/04/2021 23:58, Heinz Nabielek wrote:

On 10.04.2021, at 08:10, Antoine Monmayrant  wrote:


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...




I had initiated by log vs lin plot with

plot2d([0 80],[1 100], style=0,logflag = "nl");

but BetweenCurves starts with its own plot and here I would not know, what to 
do...


Hello,

There are two options:

(1) If you already have a handle "h0" to a plot and want BetweenCurves 
to use it, you can do:


   [h,epoly,ey1,ey2]=BetweenCurves(x,y1,y2,handle, h0)

(2) you can also do:

   [h,epoly,ey1,ey2]=BetweenCurves(x,y1,y2,handle, h0)

 and then use

   h.children(1).log_flags='nln'

to change from linear to log y axis.

Is this what you have in mind?

Antoine


Heinz

BTW, how do the French infection rates look like?

I must admit it is not a metric I track.
For the trend in France I go here 
https://coronavirus.politologue.com/coronavirus-france.FR and for a more 
global view there: https://coronavirus.politologue.com/100k-habitants/



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.62813.94217.07717.05415.59414.97614.79611.875 
   13.44816.50417.71719.44716.09913.30213.76216.032 
   19.49222.09820.42521.08720.64914.26819.40222.525 
   26.86223.51427.60323.85115.83021.57028.68226.109 
   29.97428.72724.70521.45827.08728.40133.67035.119 
   33.96228.12021.30127.24437.46737.71539.49037.569 
   30.48027.09838.36636.95135.09743.75939.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);




___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


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

2021-04-12 Thread Dang Ngoc Chan, Christophe
Hello Heinz,

> De : Heinz Nabielek
> Envoyé : samedi 10 avril 2021 23:58
>
> BTW, how do the French infection rates look like?

Thanks for caring (-:

You'll probanbly find the answer here:

https://www.gouvernement.fr/info-coronavirus/carte-et-donnees

the second curve on the left is the incidence rate which is probably close to 
what you call infection rate.

Best regards

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer



General
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error), please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


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

2021-04-11 Thread Heinz Nabielek
On 10.04.2021, at 08:10, Antoine Monmayrant mailto:antoine.monmayr...@laas.fr>> wrote:
> 
> 
> 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...




I had initiated by log vs lin plot with 
>> plot2d([0 80],[1 100], style=0,logflag = "nl");

but BetweenCurves starts with its own plot and here I would not know, what to 
do...
Heinz

BTW, how do the French infection rates look like?

>> 
>> 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.62813.94217.07717.05415.59414.97614.796
>> 11.87513.44816.50417.71719.44716.09913.30213.762 
>>16.03219.49222.09820.42521.08720.64914.268
>> 19.40222.52526.86223.51427.60323.85115.83021.570 
>>28.68226.10929.97428.72724.70521.45827.087
>> 28.40133.67035.11933.96228.12021.30127.24437.467 
>>37.71539.49037.56930.48027.09838.36636.951
>> 35.09743.75939.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);
>> 
>> 
>> 
> ___
> users mailing list
> users@lists.scilab.org 
> http://lists.scilab.org/mailman/listinfo/users 
> 

___
users mailing list
users@lists.scilab.org 
http://lists.scilab.org/mailman/listinfo/users 
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


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

2021-04-10 Thread Heinz Nabielek
On 10.04.2021, at 08:10, Antoine Monmayrant  wrote:
> 
> 
> 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...




I had initiated by log vs lin plot with 
>> plot2d([0 80],[1 100], style=0,logflag = "nl");

but BetweenCurves starts with its own plot and here I would not know, what to 
do...
Heinz

BTW, how do the French infection rates look like?

>> 
>> 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.62813.94217.07717.05415.59414.97614.796
>> 11.87513.44816.50417.71719.44716.09913.30213.762 
>>16.03219.49222.09820.42521.08720.64914.268
>> 19.40222.52526.86223.51427.60323.85115.83021.570 
>>28.68226.10929.97428.72724.70521.45827.087
>> 28.40133.67035.11933.96228.12021.30127.24437.467 
>>37.71539.49037.56930.48027.09838.36636.951
>> 35.09743.75939.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);
>> 
>> 
>> 
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


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

2021-04-09 Thread Antoine Monmayrant


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);



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


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

2021-04-09 Thread Heinz Nabielek
xfpoly does generally a good job for me, sometimes I would wish that the filling colour could be made transparent.HeinzPS 1: Is there a new version of the 2011 BetweenCurves around?PS 2: Any suggestion to make my clumsy coding more elegent, is highly welcomePS 2: BTW, since the recent lockdown, infection rates are coming down in Austria.A=[12.62813.94217.07717.05415.59414.97614.79611.87513.44816.50417.71719.44716.09913.30213.76216.03219.49222.09820.42521.08720.64914.26819.40222.52526.86223.51427.60323.85115.83021.57028.68226.10929.97428.72724.70521.45827.08728.40133.67035.11933.96228.12021.30127.24437.46737.71539.49037.56930.48027.09838.36636.95135.09743.75939.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);

AUSTRIA daily infection rates per 100,000 + confidence.pdf
Description: Adobe PDF document
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users