- unsigned int i, j;
-
- fprintf(tracesetChainState->graphsStream,
- "#!/usr/bin/gnuplot\n\n"
- "set terminal postscript eps color size 8in,6in\n");
-
- // Cover the upper triangular matrix, i is the reference node.
- for (i= 0; i < syncState->traceNb; i++)
- {
- for (j= i + 1; j < syncState->traceNb; j++)
- {
- long pos;
-
- fprintf(tracesetChainState->graphsStream,
- "\nset output \"%03d-%03d.eps\"\n"
- "plot \\\n", i, j);
-
- syncState->processingModule->writeProcessingGraphsPlots(tracesetChainState->graphsStream,
- syncState, i, j);
-
- // Remove the ", \\\n" from the last graph plot line
- fflush(tracesetChainState->graphsStream);
- pos= ftell(tracesetChainState->graphsStream);
- if (ftruncate(fileno(tracesetChainState->graphsStream), pos - 4) == -1)
- {
- g_error(strerror(errno));
- }
- if (fseek(tracesetChainState->graphsStream, 0, SEEK_END) == -1)
- {
- g_error(strerror(errno));
- }
-
- fprintf(tracesetChainState->graphsStream,
- "\nset output \"%1$03d-%2$03d.eps\"\n"
- "set key inside right bottom\n"
- "set title \"\"\n"
- "set xlabel \"Clock %1$u\"\n"
- "set xtics nomirror\n"
- "set ylabel \"Clock %2$u\"\n"
- "set ytics nomirror\n", i, j);
-
- syncState->processingModule->writeProcessingGraphsOptions(tracesetChainState->graphsStream,
- syncState, i, j);
-
- fprintf(tracesetChainState->graphsStream,
- "replot\n");
- }
- }