Hello,
I have been trying to figure out a way to add an overarching title on the graphic window that goes above the subplots? I have titles over each of my subplots, but I want one that is the title of the graphic window where the subplots are shown. I want to have the title to give a summary of what the subplots are of. I know it can be done in matlab through suptitle, but I couldn't find a respective equivalent for scilab. Thank you for your response in advance. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users |
Hi,
> I have been trying to figure out a way to add an overarching title on the > graphic window that goes above the subplots? I have titles over each of my > subplots, but I want one that is the title of the graphic window where the > subplots are shown. I want to have the title to give a summary of what the > subplots are of. Something like that? scf(0); xtitle("Title") xsetech([0,0.1,0.5,0.45]),plot(1:10,1:10),xtitle("First") xsetech([0.5,0.1,0.5,0.45]),plot(1:10,-(1:10)),xtitle("Second") xsetech([0,0.55,1,0.45]),plot(0:10,sin(0:10)),xtitle("Last") -- Jean-Yves _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users |
Dang Ngoc Chan, Christophe |
In reply to this post by bty22
Hello,
> De : bty22 > Envoyé : mercredi 10 mars 2021 22:40 > > I have been trying to figure out a way to add an overarching title on the graphic window that goes above the subplots? I suggest to create an additional subplot and then use titlepage(). Something like : ---------- X=1:10; subplot(3, 1, 1); titlepage("My big title"); subplot(3, 1, 2); plot(X, X); xtitle("First plot", "x", "y"); subplot(3, 1, 3); plot(X, X.*X); xtitle("Second plot", "x", "y"); ---------- Hope this helps -- Christophe Dang Ngoc Chan [hidden email] 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 [hidden email] http://lists.scilab.org/mailman/listinfo/users |
Samuel GOUGEON |
In reply to this post by bty22
Le 10/03/2021 à 22:40, bty22 a écrit :
Hello, I have been trying to figure out a way to add an overarching title on the graphic window that goes above the subplots? I have titles over each of my subplots, but I want one that is the title of the graphic window where the subplots are shown. I want to have the title to give a summary of what the subplots are of. I know it can be done in matlab through suptitle, but I couldn't find a respective equivalent for scilab. Thank you for your response in advance.
The following simple code should work, but a subplot's bug prevents it. Let's fix it for the next scilab version: clf, title "The overall title" fontsize 4 subplot(1,2,1), Matplot1, title "Plot #1", xlabel "" subplot(1,2,2), param3d, title "Plot #2" The position of the main title can be tuned afterwards. Samuel _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users |
Heinz Nabielek-3 |
xfpoly does generally a good job for me, sometimes I would wish that the filling colour could be made transparent.
Heinz PS 1: Is there a new version of the 2011 BetweenCurves around? 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 [hidden email] http://lists.scilab.org/mailman/listinfo/users AUSTRIA daily infection rates per 100,000 + confidence.pdf (69K) Download Attachment |
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... 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...
_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users |
Heinz Nabielek-3 |
On 10.04.2021, at 08:10, Antoine Monmayrant <[hidden email]> 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.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 > [hidden email] > http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users |
Heinz Nabielek-3 |
In reply to this post by Antoine Monmayrant
On 10.04.2021, at 08:10, Antoine Monmayrant <[hidden email]> wrote:
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? _______________________________________________ _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users |
Dang Ngoc Chan, Christophe |
In reply to this post by Heinz Nabielek-3
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 [hidden email] http://lists.scilab.org/mailman/listinfo/users |
Antoine Monmayrant |
In reply to this post by Heinz Nabielek-3
On 10/04/2021 23:58, Heinz Nabielek
wrote:
On 10.04.2021, at 08:10, Antoine Monmayrant [hidden email] 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 withplot2d([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:
(2) you can also do:
and then use
to change from linear to log y axis. Is this what you have in mind? Antoine I must admit it is not a metric I track.Heinz BTW, how do the French infection rates look like? 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.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 [hidden email] http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users |
Free forum by Nabble | Edit this page |