You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:xtic(1) w boxes title columnhead,\\", path, i, i+2);
108
-
gnuplot_cmd(h, "\"%s\" using (d='|'.strcol(1).'|', add_label(d),index(d)):2:2 w labels rotate by %d font \",5\" notitle", path, label_rot);
109
115
}
110
116
elseif (number_of_events==0){
111
117
printf("nothing to plot\n");
@@ -115,19 +121,38 @@ void plot_overall(char* output_path, char *path, int number_of_actors, int numbe
115
121
for(i=0;i<number_of_events;i++){
116
122
if(i==0){//first
117
123
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:xtic(1) w boxes title columnhead,\\", path, i, i+2);
118
-
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:%d w labels rotate by %d font \",5\" notitle,\\", path, i, i+2, i+2, label_rot);
119
124
}
120
125
elseif (i==(number_of_events-1)){//last
121
126
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d w boxes title columnhead,\\", path, i, i+2);
122
-
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:%d w labels rotate by %d font \",5\" notitle", path, i, i+2, i+2, label_rot);
123
127
}
124
128
else{
125
129
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d w boxes title columnhead,\\", path, i, i+2);
126
-
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:%d w labels rotate by %d font \",5\" notitle,\\", path, i, i+2, i+2, label_rot);
127
130
}
128
131
}
129
132
}
130
-
//sleep(6);
133
+
//draw numbers:
134
+
//gnuplot_cmd(h, "plot \\");
135
+
if(number_of_events==1){
136
+
i=0;
137
+
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:(gprintf(\"%%.2se%%S\", $%d)) w labels rotate by 20 font \",5\" notitle", path, i, i+2, i+2);
138
+
}
139
+
elseif (number_of_events==0){
140
+
printf("nothing to plot\n");
141
+
exit(0);
142
+
}
143
+
else{
144
+
for(i=0;i<number_of_events;i++){
145
+
if(i==0){//first
146
+
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:(gprintf(\"%%.2se%%S\", $%d)) w labels rotate by 20 font \",5\" notitle,\\", path, i, i+2, i+2);
147
+
}
148
+
elseif (i==(number_of_events-1)){//last
149
+
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:(gprintf(\"%%.2se%%S\", $%d)) w labels rotate by 20 font \",5\" notitle", path, i, i+2, i+2);
150
+
}
151
+
else{
152
+
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:(gprintf(\"%%.2se%%S\", $%d)) w labels rotate by 20 font \",5\" notitle,\\", path, i, i+2, i+2);
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:xtic(1) w boxes title columnhead,\\", path, i, i+2);
161
-
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:%d w labels rotate by %d font \",5\" notitle,\\", path, i, i+2, i+2, label_rot);
162
186
}
163
187
elseif (i==(number_of_events-1)){//last
164
188
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d w boxes title columnhead,\\", path, i, i+2);
165
-
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:%d w labels rotate by %d font \",5\" notitle", path, i, i+2, i+2, label_rot);
189
+
//gnuplot_cmd(h, "0 notitle"); //end plot here
166
190
}
167
191
else{
168
192
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d w boxes title columnhead,\\", path, i, i+2);
169
-
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:%d w labels rotate by %d font \",5\" notitle,\\", path, i, i+2, i+2, label_rot);
193
+
}
194
+
}
195
+
}
196
+
//draw numbers:
197
+
//gnuplot_cmd(h, "plot \\");
198
+
if(number_of_events==1){
199
+
i=0;
200
+
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:(gprintf(\"%%.2se%%S\", $%d)) w labels rotate by 20 font \",5\" notitle", path, i, i+2, i+2);
201
+
}
202
+
elseif (number_of_events==0){
203
+
printf("nothing to plot\n");
204
+
exit(0);
205
+
}
206
+
else{
207
+
for(i=0;i<number_of_events;i++){
208
+
if(i==0){//first
209
+
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:(gprintf(\"%%.2se%%S\", $%d)) w labels rotate by 20 font \",5\" notitle,\\", path, i, i+2, i+2);
210
+
}
211
+
elseif (i==(number_of_events-1)){//last
212
+
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:(gprintf(\"%%.2se%%S\", $%d)) w labels rotate by 20 font \",5\" notitle", path, i, i+2, i+2);
213
+
}
214
+
else{
215
+
gnuplot_cmd(h, "\"%s\" using ((d='|'.strcol(1).'|', add_label(d),index(d))+(d_width*%d)):%d:(gprintf(\"%%.2se%%S\", $%d)) w labels rotate by 20 font \",5\" notitle,\\", path, i, i+2, i+2);
170
216
}
171
217
}
172
218
}
@@ -190,14 +236,58 @@ int get_events_nb(char *path) {
190
236
}
191
237
192
238
fclose(file);
193
-
returnnb-3;//-3 because of first two columns (not events) and bc line ends with ';'
239
+
returnnb-3;//-3 because of the first two columns (not events) and bc line ends with ';'
194
240
}
195
241
196
242
constintis_papioutput(constchar*filename) {
197
243
if (strstr(filename,"papi_output") !=NULL) return1; //si el fichero no tiene extensión..
0 commit comments