Changeset 4d1d3a3
- Timestamp:
- 11/14/18 11:28:37 (2 years ago)
- Branches:
- develop
- Children:
- eeef260
- Parents:
- 43aec21
- Location:
- examples/tutorial
- Files:
-
- 3 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/tutorial/ipdist-parallel.c
r3b206d8 r4d1d3a3 128 128 } 129 129 130 /* RANKING SYSTEM*/130 /* To get ranking we push everything into the priority queue at pop things off 1 by one which returns them in high to lowest priority */ 131 131 for(i=0;i<4;i++) { 132 132 tally->stats->rank_src[i] = rank_new(0, tally->src[i][0]); … … 490 490 fprintf(gnuplot, "set ylabel 'Hits'\n"); 491 491 fprintf(gnuplot, "set xtics 0,10,255\n"); 492 //fprintf(gnuplot, "set y2tics\n");493 492 fprintf(gnuplot, "set output '%s'\n", outputplot); 494 //if(stats_percentage_change) {495 // fprintf(gnuplot, "set y2label 'Percentage Change'\n");496 // fprintf(gnuplot, "set y2range[-100:100]\n");497 // fprintf(gnuplot, "set ytics nomirror\n");498 // fprintf(gnuplot, "set y2tics\n");499 // fprintf(gnuplot, "plot '%s' using 1:%d title 'Source octet %d' axes x1y1 with boxes,", outputfile, i+2, i+1);500 // fprintf(gnuplot, "'%s' using 1:%d title 'Destination octet %d' axes x1y1 with boxes,", outputfile, i+3, i+1);501 // fprintf(gnuplot, "'%s' using 1:%d title 'Octet %d source change' axes x1y2 with lines,", outputfile, i+10, i+1);502 // fprintf(gnuplot, "'%s' using 1:%d title 'Octet %d destination change' axes x1y2 with lines\n", outputfile, i+11, i+1);503 504 //} else {505 493 fprintf(gnuplot, "plot '%s' using %d:%d title 'Source octet %d' smooth unique with boxes,", outputfile, (i*4)+3,(i*4)+4, i+1); 506 494 fprintf(gnuplot, "'%s' using %d:%d title 'Destination octet %d' smooth unique with boxes\n", outputfile, (i*4)+5, (i*4)+6, i+1); 507 //}508 495 fprintf(gnuplot, "replot"); 509 496 pclose(gnuplot); … … 522 509 fprintf(gnuplot, "set term pngcairo size 1280,960 \n"); 523 510 fprintf(gnuplot, "set output '%s'\n", outputplot2); 511 if(k) { 512 fprintf(gnuplot, "set title 'Timeseries Dst Octet %i'\n", i+1); 513 } else { 514 fprintf(gnuplot, "set title 'Timeseries Src Octet %i'\n", i+1); 515 } 516 fprintf(gnuplot, "set xtics rotate\n"); 524 517 fprintf(gnuplot, "set key off\n"); 525 518 //fprintf(gnuplot, "set xdata time\n"); 526 //fprintf(gnuplot, "set timefmt '%s'\n"); 519 //fprintf(gnuplot, "set timefmt '%%s'\n"); 520 //fprintf(gnuplot, "set format x '%%m/%%d/%%Y %%H:%%M:%%S'\n"); 521 fprintf(gnuplot, "set autoscale xy\n"); 527 522 if(k) { 528 fprintf(gnuplot, "plot '%sipdist-timeseries-dst-octet%d.data' using 2:xtic(1) with lines title columnheader(2), for[i= 2:257] '' using i with lines title columnheader(i)\n", stats_outputdir, i+1);523 fprintf(gnuplot, "plot '%sipdist-timeseries-dst-octet%d.data' using 2:xtic(1) with lines title columnheader(2), for[i=3:257] '' using i with lines title columnheader(i)\n", stats_outputdir, i+1); 529 524 } else { 530 fprintf(gnuplot, "plot '%sipdist-timeseries-src-octet%d.data' using 2:xtic(1) with lines title columnheader(2), for[i= 2:257] '' using i with lines title columnheader(i)\n", stats_outputdir, i+1);525 fprintf(gnuplot, "plot '%sipdist-timeseries-src-octet%d.data' using 2:xtic(1) with lines title columnheader(2), for[i=3:257] '' using i with lines title columnheader(i)\n", stats_outputdir, i+1); 531 526 } 532 527 fprintf(gnuplot, "replot");
Note: See TracChangeset
for help on using the changeset viewer.