[chronojump] Encoder 1RM analysis do not show legend (con, ecc, con-ecc, RL)



commit 5e84c27a9228d9383012a76e3a98c19e5b55a588
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Mar 9 11:09:33 2022 +0100

    Encoder 1RM analysis do not show legend (con, ecc, con-ecc, RL)

 encoder/graph.R | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 77f74399f..6ff09d28c 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -15,7 +15,7 @@
 #   along with this program; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 # 
-#   Copyright (C) 2004-2020    Xavier de Blas <xaviblas gmail com> 
+#   Copyright (C) 2004-2022    Xavier de Blas <xaviblas gmail com>
 #   Copyright (C) 2014-2020    Xavier Padullés <x padulles gmail com>
 # 
 
@@ -2166,17 +2166,19 @@ paintCrossVariables <- function (paf, varX, varY, option,
                         #             translateToPrint("L"),
                         #             translateToPrint("R")
                         #             )
-                        legendText = c(translateToPrint("concentric"), translateToPrint("eccentric"), 
paste(translateToPrint("eccentric"),translateToPrint("concentric"),sep="-"), "L", "R")
-                        
-                        rng=par("usr")
-                        lg = legend(rng[1],rng[4], 
-                                    legend=legendText, pch=c(24,25,21,3,4), col="black", pt.bg="white",
-                                    cex=1, ncol=2, bty="n",
-                                    plot=F)
-                        legend(rng[1],rng[4]+1*lg$rect$h, 
-                               legend=legendText, pch=c(24,25,21,3,4),  col="black",  pt.bg="white",
-                               cex=1, bg=bgBalls, ncol=2, bty="n",
-                               plot=T, xpd=NA)
+                       if(do1RM == FALSE) #do not show this legend on 1RM
+                       {
+                               legendText = c(translateToPrint("concentric"), translateToPrint("eccentric"), 
paste(translateToPrint("eccentric"),translateToPrint("concentric"),sep="-"), "L", "R")
+                               rng=par("usr")
+                               lg = legend(rng[1],rng[4],
+                                               legend=legendText, pch=c(24,25,21,3,4), col="black", 
pt.bg="white",
+                                               cex=1, ncol=2, bty="n",
+                                               plot=F)
+                               legend(rng[1],rng[4]+1*lg$rect$h,
+                                               legend=legendText, pch=c(24,25,21,3,4), col="black",  
pt.bg="white",
+                                               cex=1, bg=bgBalls, ncol=2, bty="n",
+                                               plot=T, xpd=NA)
+                       }
                 }
                 
         } else { #more than one series


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]