23 #include <sys/types.h>
54 sprintf(chaine,
"gnuplot -p %s",output.c_str());
55 if (fork()==0) {system(chaine);exit(0);}
62 FILE *out=fopen(output.c_str(),
"wt");
66 fprintf(out,
"$data_moyenne << EOD\n");
70 fprintf(out,
"%e ",tens1(i,j).get_x());
76 fprintf(out,
"$data_ecart_type << EOD\n");
80 fprintf(out,
"%e ",tens2(i,j).get_x());
86 fprintf(out,
"#set terminal postscript eps size 3.0,2.00 enhanced color\n");
89 fprintf(out,
"set title \"%s\" font ',14'\n",
tenseur_titre.c_str());
90 fprintf(out,
"unset key\n");
91 fprintf(out,
"set border linewidth 2\n");
92 if (!aveccouleur) fprintf(out,
"set palette rgbformula 2,2,2\n");
105 fprintf(out,
"unset xtics\n");
106 fprintf(out,
"unset ytics\n");
116 else fprintf(out,
"unset colorbox\n");
118 fprintf(out,
"set xrange []\n");
119 fprintf(out,
"set yrange [] reverse\n");
121 for (
int i=1;i<n;i++)
122 fprintf(out,
"set arrow from -0.5,%d.5 to %d.5,%d.5 nohead front lc rgb 'black' lw 1\n",i-1,
m-1,i-1);
124 for (
int j=1;j<
m;j++)
125 fprintf(out,
"set arrow from %d.5,-0.5 to %d.5,%d.5 nohead front lc rgb 'black' lw 1\n",j-1,j-1,n-1);
127 fprintf(out,
"plot '$data_moyenne' matrix with image,\\\n");
130 fprintf(out,
"'$data_moyenne' matrix using 1:2:(sprintf(\"%s\", $3)) with labels font ',14' offset 0,1 ,\\\n",
tenseur_format1.c_str());
131 fprintf(out,
"'$data_ecart_type' matrix using 1:2:(sprintf(\"(%s)\", $3)) with labels font ',14' offset 0,-0.8\n",
tenseur_format2.c_str());
133 else fprintf(out,
"'$data_moyenne' matrix using 1:2:(sprintf(\"%s\", $3)) with labels font ',14'\n",
tenseur_format1.c_str());
143 sprintf(chaine,
"gnuplot -p %s",output.c_str());
144 if (fork()==0) {system(chaine);exit(0);}
149 FILE *out=fopen(output.c_str(),
"wt");
150 fprintf(out,
"#set terminal postscript eps size 3.0,2.00 enhanced color\n");
153 fprintf(out,
"set xrange []\n");
154 fprintf(out,
"set yrange []\n");
157 fprintf(out,
"plot '%s' using 3:4 with impulses notitle lc rgb 'blue' lw 2",data_histogramme.c_str());