-
Notifications
You must be signed in to change notification settings - Fork 0
/
pH_logger_visualization.R
50 lines (33 loc) · 1.59 KB
/
pH_logger_visualization.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
library(tidyverse)
library(gridExtra)
#load data ----------------------------------------------------------------
pH_A <- read.table("PH_A.TXT", sep=",", header=F)
colnames(pH_A) <- c("Reactor","Datetime", "pH", "Voltage")
pH_B <- read.table("PH_B.TXT", sep=",", header=F)
colnames(pH_B) <- c("Reactor","Datetime", "pH", "Voltage")
pH_C <- read.table("PH_C.TXT", sep=",", header=F)
colnames(pH_C) <- c("Reactor","Datetime", "pH", "Voltage")
#plot ----------------------------------------------------------------------
#x1 <- pH_A %>% select("Datetime")
#x2 <- pH_B %>% select("Datetime")
#x3 <- pH_C %>% select("Datetime")
#y1 <- pH_A %>% select("pH")
#y2 <- pH_B %>% select("pH")
#y3 <- pH_C %>% select("pH")#TestCW
p1 <- ggplot(data = pH_A) +
geom_point(mapping = aes(x = Datetime, y = pH)) +
labs(x = "Date and Time", y = "pH", title = "Reactor A") +
theme(axis.text.x = element_text(angle = 60, hjust = 1))
p2 <- ggplot(data = pH_B) +
geom_point(mapping = aes(x = Datetime, y = pH)) +
labs(x = "Date and Time", y = "pH", title = "Reactor B") +
theme(axis.text.x = element_text(angle = 60, hjust = 1))
p3 <- ggplot(data = pH_C) +
geom_point(mapping = aes(x = Datetime, y = pH)) +
labs(x = "Date and Time", y = "pH", title = "Reactor C") +
theme(axis.text.x = element_text(angle = 60, hjust = 1))
grid.arrange(p1, p2, p3) #put days on top
ggplot(data = pH_A) +
geom_point(mapping = aes(x = Datetime, y = pH)) +
labs(x = "Date and Time", y = "pH", title = "Reactor A") +
theme(axis.text.x = element_text(angle = 60, hjust = 1))