From 3c7ea9051c45c10eb52bf09a03661bcf47577cdd Mon Sep 17 00:00:00 2001
From: Daniel Brown <ddb@star.sr.bham.ac.uk>
Date: Wed, 18 Jan 2017 15:40:07 +0000
Subject: [PATCH] fixing plotting function again

---
 pykat/gw_detectors/ifo.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pykat/gw_detectors/ifo.py b/pykat/gw_detectors/ifo.py
index 1aba3e6..b2e5c5d 100644
--- a/pykat/gw_detectors/ifo.py
+++ b/pykat/gw_detectors/ifo.py
@@ -508,7 +508,10 @@ put f1m f $mx1
                 ax.plot(out.x, out[d.signal_name(kat)], label=legend)
             else:
                 for _ in toShow:
-                    ax.plot(out.x, out[_.signal_name(kat)], label=_.name)
+                    if legend is None:
+                        legend = _.name
+                        
+                    ax.plot(out.x, out[_.signal_name(kat)], label=legend)
                 
             ax.set_xlim([np.min(out.x), np.max(out.x)])
             ax.set_xlabel("{} [deg]".format(d.name))
@@ -516,7 +519,7 @@ put f1m f $mx1
             if plotDOFs is None:
                 ax.set_ylabel('{} [W] '.format(d.port.name))
             else:
-                ax.set_ylabel('{Error signal} [W] ')
+                ax.set_ylabel('Error signal [W]')
             
             ax.grid(True)
         
-- 
GitLab