[chronojump] Encoder curvesPlot do not draw speed and other graph tweakings



commit 5318cf534a0d2ea3a848039f0c2530cc40538cfb
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Mar 15 10:46:13 2022 +0100

    Encoder curvesPlot do not draw speed and other graph tweakings

 encoder/graph.R | 36 ++++++++++++++++++------------------
 encoder/util.R  |  2 +-
 2 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 9c6847bf7..268561088 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -3153,7 +3153,7 @@ doProcess <- function(options)
                                 
                                 #mtext(at=((curves[i,1]+curves[i,2])/2/1000),  #/1000 ms -> s
                                 #     side=1,text=myLabel, cex=.8, col="blue")
-                                abline(v=c(curves[i,1],curves[i,2])/1000, lty=3, col="gray")
+                                abline(v=c(curves[i,1],curves[i,2])/1000, lty=3, col="grey30")
 
                                # if(! cutByTriggers(op) && op$TriggersOnList != "" && op$TriggersOnList != 
-1)
                                # {
@@ -3161,23 +3161,23 @@ doProcess <- function(options)
                                # }
                         }
 
-                        #plot speed
-                        par(new=T)     
-                        
-                        smoothingAll= 0.1
-                        speed <- getSpeed(displacement, smoothingAll)
-                        plot((1:length(displacement))/1000, speed$y, col="green2",
-                             type="l", 
-                             xlim=c(1,length(displacement))/1000,      #ms -> s
-                             #ylim=c(-.25,.25),                #to test speed at small changes
-                             xlab="",ylab="",axes=F)
-                        
-                        if(isInertial(op$EncoderConfigurationName))
-                                mtext(translateToPrint("body 
speed"),side=4,adj=1,line=-1,col="green2",cex=.8)
-                        else
-                                mtext(translateToPrint("speed"),side=4,adj=1,line=-1,col="green2")
-                        
-                        abline(h=0,lty=2,col="gray")
+                       ##plot speed
+                       #par(new=T)
+                       #
+                       #smoothingAll= 0.1
+                       #speed <- getSpeed(displacement, smoothingAll)
+                       #plot((1:length(displacement))/1000, speed$y, col="green2",
+                               #type="l",
+                               #xlim=c(1,length(displacement))/1000,   #ms -> s
+                               ##ylim=c(-.25,.25),             #to test speed at small changes
+                               #xlab="",ylab="",axes=F)
+                       #
+                       #if(isInertial(op$EncoderConfigurationName))
+                               #mtext(translateToPrint("body 
speed"),side=4,adj=1,line=-1,col="green2",cex=.8)
+                       #else
+                               #mtext(translateToPrint("speed"),side=4,adj=1,line=-1,col="green2")
+                       #
+                       #abline(h=0,lty=2,col="gray")
                 }
         }
         
diff --git a/encoder/util.R b/encoder/util.R
index ff792e75b..b89717495 100644
--- a/encoder/util.R
+++ b/encoder/util.R
@@ -1181,7 +1181,7 @@ getDisplacementInertialBody <- function(positionStart, displacement, draw, title
                     xlim=c(1,length(position))/1000,           #ms -> s
                     ylim=c(min(positionPerson)/10,max(position/10)),
                     xlab="",ylab="",axes=T,
-                    lty=2,col=col) 
+                    lty=1,col=col)
 
                abline(h=0, lty=2, col="gray")
        


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