diff options
author | Random Hacker <random_hacker@xapek.org> | 2010-09-01 00:40:33 +0200 |
---|---|---|
committer | Random Hacker <random_hacker@xapek.org> | 2010-09-01 00:40:33 +0200 |
commit | cfa235d91344cc6c8338d04f0e43dfeadedc1c72 (patch) | |
tree | f33a56a0953b39f9654e19df66b1f6fd4ccec11e /test.r | |
parent | 228431a46a863c104b5603a498665b012e9ea6c5 (diff) | |
download | ebus-alt-cfa235d91344cc6c8338d04f0e43dfeadedc1c72.tar.gz ebus-alt-cfa235d91344cc6c8338d04f0e43dfeadedc1c72.zip |
played around with solar pump and rectangle
Diffstat (limited to 'test.r')
-rwxr-xr-x | test.r | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -53,8 +53,6 @@ for (i in seq(1,nrow(solarEngine))) { } solarEngine <- solarEngineNew -print(solarEngine) - # Numerische Sensoren Lesen readNumericSensorDay <- function (sensorName) { d <- dbGetQuery(con, @@ -116,8 +114,20 @@ for (i in c(1:nrow(brenner))) { } # quick and dirty add solarEngine to plot + +rect_start <- 0 +rect_color <- rgb(255, 255, 0, alpha=40, maxColorValue=255) + for (i in c(1:nrow(solarEngine))) { - text(as.numeric(solarEngine$time[i]), max(data[2:length(data)],na.rm=TRUE)/2, paste("Solar Pumpe", solarEngine$value_int[i]), srt=90) + if (solarEngine$value_int[i] == 1) { + rect_start <- solarEngine$time[i]; + } else if (rect_start != 0) { + end <- solarEngine$time[i]; + # plot + rect(rect_start, 0, solarEngine$time[i], 100, col=rect_color,border=F) + beginn <- 0 + } + #text(as.numeric(solarEngine$time[i]), max(data[2:length(data)],na.rm=TRUE)/2, paste("Solar Pumpe", solarEngine$value_int[i]), srt=90) } rangeX <- as.POSIXct(range(data$time)) |