version 1.41, 2002/05/07 15:53:01
|
version 1.41.2.1, 2003/06/12 10:43:20
|
Line 60
|
Line 60
|
/*#define GNUPLOTPROGRAM "..\\gp37mgw\\wgnuplot"*/
|
/*#define GNUPLOTPROGRAM "..\\gp37mgw\\wgnuplot"*/
|
#define FILENAMELENGTH 80
|
#define FILENAMELENGTH 80
|
/*#define DEBUG*/
|
/*#define DEBUG*/
|
#define windows
|
|
|
/*#define windows*/
|
#define GLOCK_ERROR_NOPATH -1 /* empty path */
|
#define GLOCK_ERROR_NOPATH -1 /* empty path */
|
#define GLOCK_ERROR_GETCWD -2 /* cannot get cwd */
|
#define GLOCK_ERROR_GETCWD -2 /* cannot get cwd */
|
|
|
Line 2158 m=pow(2,cptcoveff);
|
Line 2159 m=pow(2,cptcoveff);
|
for (cpt=1; cpt<= nlstate ; cpt ++) {
|
for (cpt=1; cpt<= nlstate ; cpt ++) {
|
for (k1=1; k1<= m ; k1 ++) {
|
for (k1=1; k1<= m ; k1 ++) {
|
|
|
#ifdef windows
|
fprintf(ficgp,"set xlabel \"Age\" \nset ylabel \"Probability\" \nset ter gif small size 400,300\nplot [%.f:%.f] \"vpl%s\" every :::%d::%d u 1:2 \"\%%lf",ageminpar,fage,fileres,k1-1,k1-1);
|
fprintf(ficgp,"set xlabel \"Age\" \nset ylabel \"Probability\" \nset ter gif small size 400,300\nplot [%.f:%.f] \"vpl%s\" every :::%d::%d u 1:2 \"\%%lf",ageminpar,fage,fileres,k1-1,k1-1);
|
|
#endif
|
|
#ifdef unix
|
|
fprintf(ficgp,"set xlabel \"Age\" \nset ylabel \"Probability\" \nplot [%.f:%.f] \"vpl%s\" u 1:2 \"\%%lf",ageminpar,fage,fileres);
|
|
#endif
|
|
|
|
for (i=1; i<= nlstate ; i ++) {
|
for (i=1; i<= nlstate ; i ++) {
|
if (i==cpt) fprintf(ficgp," \%%lf (\%%lf)");
|
if (i==cpt) fprintf(ficgp," \%%lf (\%%lf)");
|
Line 2180 for (i=1; i<= nlstate ; i ++) {
|
Line 2176 for (i=1; i<= nlstate ; i ++) {
|
else fprintf(ficgp," \%%*lf (\%%*lf)");
|
else fprintf(ficgp," \%%*lf (\%%*lf)");
|
}
|
}
|
fprintf(ficgp,"\" t\"\" w l 1,\"p%s\" every :::%d::%d u 1:($%d) t\"Observed prevalence \" w l 2",fileres,k1-1,k1-1,2+4*(cpt-1));
|
fprintf(ficgp,"\" t\"\" w l 1,\"p%s\" every :::%d::%d u 1:($%d) t\"Observed prevalence \" w l 2",fileres,k1-1,k1-1,2+4*(cpt-1));
|
#ifdef unix
|
|
fprintf(ficgp,"\nset ter gif small size 400,300");
|
|
#endif
|
|
fprintf(ficgp,"\nset out \"v%s%d%d.gif\" \nreplot\n\n",strtok(optionfile, "."),cpt,k1);
|
fprintf(ficgp,"\nset out \"v%s%d%d.gif\" \nreplot\n\n",strtok(optionfile, "."),cpt,k1);
|
}
|
}
|
}
|
}
|
Line 3526 free_matrix(mint,1,maxwav,1,n);
|
Line 3520 free_matrix(mint,1,maxwav,1,n);
|
|
|
|
|
end:
|
end:
|
#ifdef windows
|
|
/* chdir(pathcd);*/
|
/* chdir(pathcd);*/
|
#endif
|
|
/*system("wgnuplot graph.plt");*/
|
/*system("wgnuplot graph.plt");*/
|
/*system("../gp37mgw/wgnuplot graph.plt");*/
|
/*system("../gp37mgw/wgnuplot graph.plt");*/
|
/*system("cd ../gp37mgw");*/
|
/*system("cd ../gp37mgw");*/
|
Line 3538 free_matrix(mint,1,maxwav,1,n);
|
Line 3530 free_matrix(mint,1,maxwav,1,n);
|
strcat(plotcmd,optionfilegnuplot);
|
strcat(plotcmd,optionfilegnuplot);
|
system(plotcmd);
|
system(plotcmd);
|
|
|
#ifdef windows
|
/*#ifdef windows*/
|
while (z[0] != 'q') {
|
while (z[0] != 'q') {
|
/* chdir(path); */
|
/* chdir(path); */
|
printf("\nType e to edit output files, g to graph again, c to start again, and q for exiting: ");
|
printf("\nType e to edit output files, g to graph again, c to start again, and q for exiting: ");
|
Line 3548 free_matrix(mint,1,maxwav,1,n);
|
Line 3540 free_matrix(mint,1,maxwav,1,n);
|
else if (z[0] == 'g') system(plotcmd);
|
else if (z[0] == 'g') system(plotcmd);
|
else if (z[0] == 'q') exit(0);
|
else if (z[0] == 'q') exit(0);
|
}
|
}
|
#endif
|
/*#endif */
|
}
|
}
|
|
|
|
|