[chronojump] Fixed minimum points in crossVariable profiles



commit a4749c480ac08d7b6ca0e4c6c976b4bee1663af9
Author: Xavier Padullés <x padulles gmail com>
Date:   Tue Apr 10 13:53:04 2018 +0200

    Fixed minimum points in crossVariable profiles

 encoder/graph.R |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 820b991..8d85099 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -1890,7 +1890,8 @@ paintCrossVariables <- function (paf, varX, varY, option,
                 }
                 else {
                         #if less than 3 different X then cannot calculate fittings. Just plot here to not 
crash on stroverlap (after)
-                        if(length(unique(x)) < 3) {
+                        if((varY == "Power" && varX == "Load" && length(unique(x)) < 3) ||
+                           length(unique(x)) < 2) {
                                 plot(x,y, xlab=varXut, ylab="", pch=pchVector, 
col=colBalls,bg=bgBalls,cex=cexBalls,axes=F)
                                 
                                 paintCrossVariablesLaterality(x, y, laterality, colBalls)


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