}
if (s < nset-1)
{
- fprintf(fp, "&\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
}
gmx_ffclose(fp);
}
fprintf(stdout, "Set %3d: err.est. %g a %g tau1 %g tau2 %g\n",
s+1, ee, a, tau1, tau2);
- fprintf(fp, "@ legend string %d \"av %f\"\n", 2*s, av[s]);
- fprintf(fp, "@ legend string %d \"ee %6g\"\n",
- 2*s+1, sig[s]*anal_ee_inf(fitparm, n*dt));
+ if (output_env_get_xvg_format(oenv) == exvgXMGR)
+ {
+ fprintf(fp, "@ legend string %d \"av %f\"\n", 2*s, av[s]);
+ fprintf(fp, "@ legend string %d \"ee %6g\"\n", 2*s+1, sig[s]*anal_ee_inf(fitparm, n*dt));
+ }
+ else if (output_env_get_xvg_format(oenv) == exvgXMGRACE)
+ {
+ fprintf(fp, "@ s%d legend \"av %f\"\n", 2*s, av[s]);
+ fprintf(fp, "@ s%d legend \"ee %6g\"\n", 2*s+1, sig[s]*anal_ee_inf(fitparm, n*dt));
+ }
for (i = 0; i < nbs; i++)
{
fprintf(fp, "%g %g %g\n", tbs[i], sig[s]*sqrt(ybs[i]/(n*dt)),
s+1, sig[s]*anal_ee_inf(ac_fit, n*dt),
ac_fit[1], ac_fit[0], ac_fit[2]);
- fprintf(fp, "&\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
for (i = 0; i < nbs; i++)
{
fprintf(fp, "%g %g\n", tbs[i],
}
if (s < nset-1)
{
- fprintf(fp, "&\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
}
sfree(fitsig);
}
if (s < nset-1)
{
- fprintf(out, "&\n");
+ fprintf(out, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
}
gmx_ffclose(out);