Hi I have a question about geom_line.
what I want to do, for the same line, have different color segments according to some filter, apply to another variable, and not to the variable used to draw the line.
for example, if we have a framework with header time, var1 and var2
time <- seq (1,7,1) var1 <- c(3,5,7,2,3,2,8) var2 <- c(2,4,18,16,12,3,2)
if I have a timeline vs var1 using geom_line and allows me to say that I want to color the line by applying a filter above 10 on the var2 variable. therefore, the line will have the same color for time 1,2,6,7 and a different color for 3,4,5.
Please tell me if this is possible? if yes, please give me some advice.
source share