1
0
Fork 0
mirror of https://github.com/sensebox/opensensmapr synced 2025-02-20 20:23:58 +01:00

show units in measurements plot

This commit is contained in:
noerw 2017-08-23 16:12:03 +02:00
parent 3ed57a4c49
commit 3f46a52b3c

View file

@ -1,6 +1,8 @@
#' @export
plot.osem_measurements = function (x, ...) {
# TODO: group/color by sensor_id
plot(value~createdAt, x, col = x$sensorId, ...)
oldpar = par()
par(mar = c(2,4,1,1))
plot(value~createdAt, x, col = x$sensorId, xlab = NA, ylab = x$unit[1], ...)
par(mar = oldpar$mar)
invisible(x)
}