--- imach/src/imach.c 2002/05/07 15:53:01 1.41 +++ imach/src/imach.c 2003/06/12 10:43:20 1.41.2.1 @@ -1,4 +1,4 @@ -/* $Id: imach.c,v 1.41 2002/05/07 15:53:01 lievre Exp $ +/* $Id: imach.c,v 1.41.2.1 2003/06/12 10:43:20 brouard Exp $ Interpolated Markov Chain Short summary of the programme: @@ -60,7 +60,8 @@ /*#define GNUPLOTPROGRAM "..\\gp37mgw\\wgnuplot"*/ #define FILENAMELENGTH 80 /*#define DEBUG*/ -#define windows + +/*#define windows*/ #define GLOCK_ERROR_NOPATH -1 /* empty path */ #define GLOCK_ERROR_GETCWD -2 /* cannot get cwd */ @@ -2158,12 +2159,7 @@ m=pow(2,cptcoveff); for (cpt=1; cpt<= nlstate ; cpt ++) { 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); -#endif -#ifdef unix -fprintf(ficgp,"set xlabel \"Age\" \nset ylabel \"Probability\" \nplot [%.f:%.f] \"vpl%s\" u 1:2 \"\%%lf",ageminpar,fage,fileres); -#endif + 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); for (i=1; i<= nlstate ; i ++) { if (i==cpt) fprintf(ficgp," \%%lf (\%%lf)"); @@ -2180,9 +2176,7 @@ for (i=1; i<= nlstate ; i ++) { 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)); -#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); } } @@ -3526,9 +3520,7 @@ free_matrix(mint,1,maxwav,1,n); end: -#ifdef windows /* chdir(pathcd);*/ -#endif /*system("wgnuplot graph.plt");*/ /*system("../gp37mgw/wgnuplot graph.plt");*/ /*system("cd ../gp37mgw");*/ @@ -3538,7 +3530,7 @@ free_matrix(mint,1,maxwav,1,n); strcat(plotcmd,optionfilegnuplot); system(plotcmd); -#ifdef windows + /*#ifdef windows*/ while (z[0] != 'q') { /* chdir(path); */ printf("\nType e to edit output files, g to graph again, c to start again, and q for exiting: "); @@ -3548,7 +3540,7 @@ free_matrix(mint,1,maxwav,1,n); else if (z[0] == 'g') system(plotcmd); else if (z[0] == 'q') exit(0); } -#endif + /*#endif */ }