I learned from stack overflow that geom_path()
can remove the line from different part of data on the same line. It means that inside the whole Red line, there are some other colors parts, and without this command, the last point at previous blue part is linked to the first point in next blue part. Code and image are as below:
p6 <- ggplot(data = M1.m, mapping = aes(x = as.Date(M1_Date, format='%d/%m/%Y'),
y = M1_Value, color = factor(NewGroup))) + geom_path(aes(group = 1)) + geom_point(size = 0.5)
p6 <- p6 + labs(x = "Date", y = "Value") + labs(color = "Value Type")
p6
When I use them, it seems that interval data has solved this questions, but there is a wired line linked between the first data and the last data. Can you please tell me how to remove that?
The data is too large and I cannot link here sorry about that and here is the link: Data
Thank you!