[chronojump] Encoder instant graph: shown Propulsive/Non propulsive at sides of abline



commit 69747079ea631cc6e65620e78f7c148283acb028
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Jan 8 12:33:38 2019 +0100

    Encoder instant graph: shown Propulsive/Non propulsive at sides of abline

 encoder/graph.R  | 6 +++++-
 src/constants.cs | 8 ++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index bc261617..e4fee29a 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -902,8 +902,12 @@ paint <- function(displacement, eccon, xmin, xmax, xrange, yrange, knRanges, pai
                 }
 
                 #show propulsive stuff if line if differentiation is relevant (propulsivePhase ends before 
the end of the movement)
-                if(isPropulsive & propulsiveEnd < length(displacement)) {
+                if(paintMode != "superpose" & isPropulsive & propulsiveEnd < length(displacement)) {
                         abline(v=propulsiveEnd,lty=1,col=cols[2])
+                       mtext(text=paste(translateToPrint("Propulsive"), " ", sep=""),
+                             side=1,at=propulsiveEnd,adj=1,cex=.8,col=cols[2],line=-1)
+                       mtext(text=paste(" ", translateToPrint("Non propulsive"), sep=""),
+                             side=1,at=propulsiveEnd,adj=0,cex=.8,col=cols[2],line=-1)
                        if(showAccel) {
                                segments(0,-9.81,length(accel$y),-9.81,lty=3,col="magenta")
                                points(propulsiveEnd, -g, col="magenta")
diff --git a/src/constants.cs b/src/constants.cs
index 5d55027b..8d9958bd 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -1000,7 +1000,9 @@ public class Constants
                "Laterality", "RL", "R", "L",
                "Inertia M.",
                "Maximum mean power using the F-V profile",
-               "Mean power parabole using the Power-Load data"
+               "Mean power parabole using the Power-Load data",
+               "Propulsive",
+               "Non propulsive"
        };
        /*
         * written here in order to be translated
@@ -1049,6 +1051,8 @@ public class Constants
                Catalog.GetString("Laterality"), Catalog.GetString("RL"), Catalog.GetString("R"), 
Catalog.GetString("L"),
                Catalog.GetString("Inertia M."),
                Catalog.GetString("Maximum mean power using the F-V profile"),
-               Catalog.GetString("Mean power parabole using the Power-Load data")
+               Catalog.GetString("Mean power parabole using the Power-Load data"),
+               Catalog.GetString("Propulsive"),
+               Catalog.GetString("Non propulsive")
        };
 }


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