Merge release-4-6 into master
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_sgangle.c
index 8914ecf53edcc4808b3e41335899a517857aec40..0c7c37929eaf216fcff1774d1c0b474fa00e7557 100644 (file)
@@ -218,7 +218,7 @@ void sgangle_plot(const char *fn, const char *afile, const char *dfile,
     matrix       box;
     char         buf[256]; /* for xvgr title */
     gmx_rmpbc_t  gpbc = NULL;
-
+    const char*  aleg[2] = { "cos(Angle)", "Angle (degrees)" };     /* legends for sg_angle output file */
 
     if ((natoms = read_first_x(oenv, &status, fn, &t, &x0, box)) == 0)
     {
@@ -227,6 +227,7 @@ void sgangle_plot(const char *fn, const char *afile, const char *dfile,
 
     sprintf(buf, "Angle between %s and %s", grpn1, grpn2);
     sg_angle = xvgropen(afile, buf, "Time (ps)", "Angle (degrees)", oenv);
+    xvgr_legend(sg_angle, 2, aleg, oenv);
 
     if (dfile)
     {