- if(output_env_get_print_xvgr_codes(oenv))
- {
- fprintf(fp, "@ legend on\n");
- fprintf(fp, "@ legend box on\n");
- fprintf(fp, "@ legend loctype view\n");
- fprintf(fp, "@ legend 0.75, 0.8\n");
- fprintf(fp, "@ legend string 0 \"Total/mean\"\n");
- fprintf(fp, "@ legend string 1 \"Total\"\n");
- fprintf(fp, "@ legend string 2 \"Mean\"\n");
- fprintf(fp, "@ legend string 3 \"# atoms\"\n");
- fprintf(fp, "@ legend string 4 \"Mean/# atoms\"\n");
- fprintf(fp, "#%3s %8s %3s %8s %3s %8s\n",
- "res", "ratio", "tot", "mean", "natm", "mean/atm");
- }
+ sprintf(legend[0],"Total/mean");
+ sprintf(legend[1],"Total");
+ sprintf(legend[2],"Mean");
+ sprintf(legend[3],"# atoms");
+ sprintf(legend[4],"Mean/# atoms");
+ xvgr_legend(fp,5,(const char**)legend,oenv);