[chronojump] MIF. Fixed impulse color
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] MIF. Fixed impulse color
- Date: Wed, 20 Dec 2017 12:19:06 +0000 (UTC)
commit 2734cd625c5051fba60bf38bec8c5a27b3aff66b
Author: Xavier Padullés <x padulles gmail com>
Date: Wed Dec 20 13:18:04 2017 +0100
MIF. Fixed impulse color
r-scripts/maximumIsometricForce.R | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/r-scripts/maximumIsometricForce.R b/r-scripts/maximumIsometricForce.R
index 8d23e6d..4ca0134 100644
--- a/r-scripts/maximumIsometricForce.R
+++ b/r-scripts/maximumIsometricForce.R
@@ -248,6 +248,7 @@ drawDynamicsFromLoadCell <- function(
if(impulseOptions$impulseFunction == "RAW")
{
+ impulseColor = "black"
#Drawing the area under the force curve (Impulse)
polygon(c(dynamics$time[startImpulseSample:endImpulseSample],
dynamics$time[endImpulseSample] , dynamics$time[startImpulseSample]),
@@ -271,6 +272,7 @@ drawDynamicsFromLoadCell <- function(
impulse = impulse / 2
} else if(impulseOptions$impulseFunction == "FITTED")
{
+ impulseColor = "blue"
#Drawing the area under the force curve (Impulse)
polygon(c(dynamics$time[startImpulseSample:endImpulseSample],
dynamics$time[endImpulseSample] , dynamics$time[startImpulseSample]),
@@ -563,9 +565,10 @@ drawDynamicsFromLoadCell <- function(
abline(a = intercept, b = RFD, lty = 2, col = color)
}
}
-
- if(impulseLegend != "")
+ if(impulseLegend != ""){
legendText = c(legendText, impulseLegend)
+ legendColor = c(legendColor, impulseColor)
+ }
legend(x = xmax, y = dynamics$fmax.fitted/2, legend = legendText, xjust = 1, yjust = 0.1, text.col =
legendColor)
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]