[chronojump] Encoder fixed height on side compare
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder fixed height on side compare
- Date: Tue, 12 Feb 2013 17:34:34 +0000 (UTC)
commit f236f84767e56195c38510c90ae4798302ed6034
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Feb 12 16:17:29 2013 +0100
Encoder fixed height on side compare
encoder/graph.R | 35 ++++++++++++++---------------------
1 files changed, 14 insertions(+), 21 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 3050ca7..1288d0b 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -722,28 +722,21 @@ find.mfrow <- function(n) {
}
find.yrange <- function(singleFile, rawdata, curves) {
- if(singleFile) {
- a=cumsum(rawdata)
- y.max = max(a)
- y.min = min(a)
- if(y.min < 0) {
- y.max = y.max + -1*y.min
- y.min = 0
- }
- return (c(y.min,y.max))
- } else {
- n=length(curves[,1])
- y.max = 0
- y.min = 10000
- for(i in 1:n) {
- y.current = cumsum(rawdata[curves[i,1]:curves[i,2]])
- if(max(y.current) > y.max)
- y.max = max(y.current)
- if(min(y.current) < y.min)
- y.min = min(y.current)
- }
- return (c(y.min,y.max))
+ n=length(curves[,1])
+ y.max = 0
+ y.min = 10000
+ for(i in 1:n) {
+ y.current = cumsum(rawdata[curves[i,1]:curves[i,2]])
+ if(max(y.current) > y.max)
+ y.max = max(y.current)
+ if(min(y.current) < y.min)
+ y.min = min(y.current)
+ }
+ if(y.min < 0) {
+ y.max = y.max + -1*y.min
+ y.min = 0
}
+ return (c(y.min,y.max))
}
quitIfNoData <- function(n, curves, outputData1) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]