Fixed g_sgangle legends.
authorJustin Lemkul <jalemkul@vt.edu>
Wed, 15 May 2013 14:28:58 +0000 (10:28 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 16 May 2013 22:02:07 +0000 (00:02 +0200)
There were no legends previously, and questions are often asked
about the interpretation of the data.  This commit adds proper
s0 and s1 legends in XmGrace format.

Change-Id: I7bdcb57167eb3a0cef90a9b9dba9d04b86ba7cbd

src/tools/gmx_sgangle.c

index 4dff205e08390ff7b2ee76b73774888b11c548d9..11adcec69ce295c33ebaaecb2f6a5cff2a77fbcd 100644 (file)
@@ -221,7 +221,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)
     {
@@ -230,6 +230,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)
     {