git://git.onelab.eu
/
monitor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add myops_restoration
[monitor.git]
/
statistics
/
functions.r
diff --git
a/statistics/functions.r
b/statistics/functions.r
index
bc6b8d4
..
d9e4023
100644
(file)
--- a/
statistics/functions.r
+++ b/
statistics/functions.r
@@
-397,10
+397,15
@@
add_timestamp <- function (t)
return (t);
}
return (t);
}
-abline_at_date <- function (date, col='black', lty=1, format="%Y-%m-%d")
+abline_at_date <- function (date, col='black', lty=1, format="%Y-%m-%d"
, height=0
)
{
ts <-unclass(as.POSIXct(date, format=format, origin="1970-01-01"))[1]
{
ts <-unclass(as.POSIXct(date, format=format, origin="1970-01-01"))[1]
- abline(v=ts, col=col, lty=lty)
+ if ( height == 0 )
+ {
+ abline(v=ts, col=col, lty=lty)
+ } else {
+ lines(c(ts,ts),c(0,height), col=col, lty=lty)
+ }
return (ts);
}
return (ts);
}