From dd0ddd7d3ef42ad940d6c592fc1f821589b63f78 Mon Sep 17 00:00:00 2001 From: Justin Lemkul Date: Wed, 15 May 2013 10:28:58 -0400 Subject: [PATCH] Fixed g_sgangle legends. 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/gmx_sgangle.c b/src/tools/gmx_sgangle.c index 4dff205e08..11adcec69c 100644 --- a/src/tools/gmx_sgangle.c +++ b/src/tools/gmx_sgangle.c @@ -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) { -- 2.22.0