I am trying to combine two different ggplot (line graph) into one x and y axis. However, one graph has y range of -0.5 to 0.5 and another graph has y range of 50 to 110.
I would like to ignore y ranges of two graphs and just want to combine them into one graph which show plot of two different graph clearly.
library(ggplot2)
p1 <- ggplot(data2, aes(x = t, y = ECG)) + geom_line() + xlim(c(0,3)) + ylim(c(-1,1))
p2 <- p1 + geom_line(aes(y = NIBP))
p2