From 3f46a52b3c682a6a835667112d05bb1f9b8f71e7 Mon Sep 17 00:00:00 2001 From: noerw Date: Wed, 23 Aug 2017 16:12:03 +0200 Subject: [PATCH] show units in measurements plot --- R/measurement_utils.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/measurement_utils.R b/R/measurement_utils.R index a4aba4c..26d1741 100644 --- a/R/measurement_utils.R +++ b/R/measurement_utils.R @@ -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) }